Symptoms
Random website pages fail to open with the following error message in a web-browser:
Bad request
Your browser sent a request that this server could not understand.
Size of a request header field exceeds server limit.
Cause
Size of a request header field has exceeded the server limit defined in Apache configuration. The default Apache header size is 8 KB.
Resolution
-
Connect to the Plesk server via SSH.
-
Create a backup of the Apache configuration file:
# cp -a /etc/httpd/conf/httpd.conf /root/httpd.conf_`date +%F`
-
Open the file in a text editor. In this example, we are using the vi editor:
# vi /etc/httpd/conf/httpd.conf
-
Add the following line and specify your value (16000 is an example):
LimitRequestFieldSize 16000
-
Save the changes and close the file.
-
Restart the Apache service to apply the changes:
# service httpd restart
Note: In case the value of 16000 (16KB) is not enough, increase it to the greater value, for example, 32000 (32KB).
-
Connect to the Plesk server via SSH.
-
Create a backup of the Apache configuration file:
# cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf_`date +%F`
-
Open the file in a text editor. In this example, we are using the vi editor:
# vi /etc/apache2/apache2.conf
-
Add the following line and specify your value (16000 is an example):
LimitRequestFieldSize 16000
-
Save the changes and close the file.
-
Restart the Apache service to apply the changes:
# service apache2 restart
Note: In case the value of 16000 (16KB) is not enough, increase it to the greater value, for example, 32000 (32KB).