After a fresh install of Apache 2.4.27 on my Unix system I discovered something really odd. My local server giving me 500 error with this error log
AH02429: Response header name 'Content-Length' contains invalid characters, aborting request I tried with all installed browser Chrome, Firefox, Safari problem is same. As I can see my browsers not sending this header, not sure why I am encountering this error. I tried with curl and it's same. Added some tweaks on my httpd.conf file, nothing changed.
I Googled and found that this error comes form apache new module Filter. My apache complied with all modules is there anyway to tell the Filter module to not check for headers or something?
Any kind of help will be life saving.
Thanks in advance
Related
I've been trying to configure my Apache Httpd 2.4 server to use mod_cache and mod_cache_disk to do caching for a Wordpress site. It should have a big improvement of performance. I have followed all the guides and done everything right, and yet... no files get saved in the cache.
I enabled logging of cache errors and I see this error coming up: "cache miss: cache unwilling to store response". Ok... I looked in the source code of mod_cache.c and it looks like that happens when cache_create_entity() returns anything other than OK. So I looked at the souce of mod_ccache_disk.c and I can see that in create_entity(), it silently fails if conf->cache_root == NULL. In all other cases, it would log an error or return OK.
I can only assume that it's failing because conf->cache_root is null. Where does that come from? It would come from ap_get_module_config to get the config of the cache_disk_module.
How can that possibly be returning null? And more annoyingly, why does the Apache server give some log message when there's a major error condition, such as loading a module but not having a config object for it?
Really stumped on this one... Thank you.
Problem solved: SELinux was blocking files from being created in the CacheRoot I specified. I had to put it in the right directory that had permissions, or I could have added permission to the directory.
I have a 1GB ram Apache 2.4.10 (MPM event) VPS, my user complained that they always encounter broken webpage or image was loaded frquently, when I try to use fiddler to investigate, I found content length mismatch problem occurred in those broken image/pages. Seems that Apache sometimes did not sent the whole file to the client. I already disable HTTP/206 in Apache server but problem still persisted.
Any idea on it ? Or i need to install the newest version 2.4.16 ?
Thanks.
I think you need to check your apache services error logs file so that you can find out the exact root cause of this issues. Please check that and let us know what error are you getting in error logs file ? We will try to help you on this with the that error logs.
I am a noob and I have recently started playing with my apache2 installation and trying to see how things are working. Also this exercise helps me figure out more things about apache2 than just reading some manual online.
But I am unable to figure out what I did now ?
So, here is my question: I enabled default-ssl (and have disabled default, i.e., have closed port 80, so that you can only connect the server with https)> I remember previously (say couple of days back) when i did the same and tried to access my website using http, it was giving me some error in the browser saying the web page could not be found or something. But today, doing the same thing give a nice error page saying one should use https instead of http.
Bad Request
Your browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.
Hint: https: // 127.0.1.1/
And, I actually like this. But, I am trying to remember what things I might have done in between to activate such nice error page which was previously not shown.
I know I did something and I cannot remember what I did and asking you to figure that out. I feel bit stupid out there. But, it would be great if any Apache Sherlock out there who could help me. BTW, I am using Ubuntu 12.10.
Thanks
I am trying to setup Nginx + Unicorn + Rails 3. Nginx will also serve some static and php projects. However when I open the site I always see a
400 Bad Request
Request Header Or Cookie Too Large
error page. Nothing in the access nor error logs.
/etc/nginx
nginx.conf https://gist.github.com/1117152
php.conf https://gist.github.com/1117154
drop.conf https://gist.github.com/1117158
/etc/nginx/sites-enabled
https://gist.github.com/1117161
I am pretty stuck here because I don't see anything in logs.
hmm of course it's the users fault. I had a wrong references to the socket in the site-available conf and an endless loop was the result. I fixed it in the gist.
Check your "large_client_header_buffers". You might need to use a larger value if your application require
This came high up on Google so to save time for people in the same situation:
I included the JavaScript FB_Init (Facebook) on a page and had the "cookie=true" which produced an amazingly big cookie. Turning this to false was the solution and resolved the identical message.
so, I'm running Apache on my laptop.
If I go to "localhost", I get the page that says,
If you can see this, it means that the installation of the Apache web server software on this system was successful. You may now add content to this directory and replace this page.
except, I can't add content and replace that page.
I can click on its links, and that works fine.
First of all, there's not even an "index.html" document in that directory. If I try to directly access one that I created with localhost/index.html, I get "the request URL was not found on the server." So, I'm not even sure where that page is coming from. I've searched for words in that page under the apache directory, and nothing turns up. It seems to redirect somewhere.
Just as a test, I KNOW that it loads localhost/manual/index.html (doesn't matter what that is) so I tried to replace that with something I've written, and I received the message
The server encountered an internal error or misconfiguration and was unable to complete your request.
The error log says,
[Fri Sep 12 20:27:54 2008] [error] [client 127.0.0.1] Syntax error in type map, no ':' in C:/Program Files/Apache Group/Apache2/manual/index.html for header \r\n
But, that page works fine if I open directly with a browser.
so, basically, I don't know what I don't know here. I'm not sure what apache is looking for. I'm not sure if the error is in my config file, my html page, or what.
Oh, and the reason I want to open this using apache is (mainly) because I'm trying to test some php, so I'm trying to get apache to run locally.
Thanks.
"By default, your pages should be placed in the "C:\Program Files\Apache Group\Apache2\htdocs" folder for Apache 2.0 and the "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs" folder for Apache 2.2. When your site is ready, simply delete the existing files in the folder and replace them with those you want to test."
From here.
OK,
To answer my own. . .I found that the "Listen" directive in the configuration file had been set to "Listen 80" instead of "Listen localhost: 80".
Also, localhost/htdocs/index.html doesn't work, but localhost/index.html does.
Hopefully this can help someone in the future.
Thanks, Schroeder.
If you have Skype it also uses the same ports(80, 443) as Xampp does. So start Xampp first and then Skype.
[source: http://starikovs.com/2011/02/23/apache-doesnt-start-in-xampp/]