Archive for category Apache

Request-URI Too Large

The circumstances that I came across the “Request-URI Too Large” Apache message is rather unique. In short, I’m loading graphs (images) on a dashboard from another website (Graphite) and the URL for the image can get pretty big because the image needs to be rendered by the Graphite render API.

Disclaimer: If you’re using forms and GET then I would definitely recommend changing the form to use POST and this solution should not be used.

The problem here is that Apache httpd has limited the amount of data that can be accepted through Request line. The default is 8192 bytes or 8 KB.

In order to overwrite this then simply add the following to virtual host or server config.

LimitRequestLine <sub>bytes</sub>

e.g. LimitRequestLine 15360

No Comments

Apache Warning – [warn] _default_ VirtualHost overlap on port 80, the first has precedence

Message on starting httpd:[warn] default VirtualHost overlap on port 80, the first has precedence

The reason you’re getting this message is because you’re supporting more than one site on the same port which in this case it is port 80. To fix the issue simply open the httpd.conf file (usually found in /etc/httpd) and add uncomment or add the following line:

NameVirtualHost *:80

No Comments

Enabling .htaccess in Apache

To enable .htaccess for Apache you must:

  1. Find httpd.conf and open it to edit

  2. In the file find references to AllowOverride for your webroot directory or any other directory you have set up and wish to use .htaccess in and change NONE to All

  3. Close and save the file

  4. Restart Apache service for changes to take effect

No Comments