Apache’s default URL/URI length of 8190 characters is sufficient for most websites. However, if your requests exceed this limit, then Apache will throw a “Request-URI too large” error. To fix this problem, we will increase the max URL length in Apache. 

Solution – 1:

1) Login into the SSH server.

2) Open the Apache configuration file in a text editor. You will find the Apache server configuration file located at one of the following locations, depending on your installation.

  • /etc/apache2/httpd.conf
  • /etc/apache2/apache2.conf (or) /usr/local/apache/conf/httpd.conf

If you want to increase the max URL/URI length in Apache to 100000 characters, just add the following line to your Apache server configuration file.

# vi /usr/local/apache/conf/httpd.conf
LimitRequestLine 100000

3) Make sure the configuration syntax is correct or not with help of the following command:

# httpd -t

4) Restart Apache Web Server

# service httpd restart

# systemctl restart httpd

Solution – 2:

1)  Log in to WHM as the root user. Go to Home » Service Configuration » Apache Configuration

2) Select ‘Include Editor

2) Choose any Include from below as apache configuration. 

Note: How to find out which ‘include’ working in Apache configuration?

– Go to Home » Server Configuration » Terminal

# grep Include /usr/local/apache/conf/httpd.conf

Include “/etc/apache2/conf.d/includes/post_virtualhost_global.conf”
Include “/etc/apache2/conf.d/includes/post_virtualhost_2.conf”

3) Choose the Apache version are select all apache under the Home » Service Configuration » Apache Configuration >> Include Editor – Post VirtualHost Include

–  Enter the following and click update.

LimitRequestLine 100000

4)  Restart Apache Web Server

Home » Restart Services » HTTP Server (Apache)

Get Free cPanel Knowledge Base

Thank you for subscribing.

Something went wrong.

0.00 avg. rating (0% score) - 0 votes