Applicable to:
- Plesk for Linux
Symptoms
Website pages fail to open with the following error message in a web-browser:
PLESK_INFO: 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 the Apache web server (most often) configuration. The default Apache header size that is allowed is 8 KB.
Resolution
-
Connect to the Plesk server via SSH
-
Create a backup of the Apache configuration file (just in case):
# cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf_`date +%F`
-
Open the
/etc/apache2/apache2.conf
file with your favorite command-line text editor -
Add the following line right after the
# Global configuration
line (near the top of the file) and specify your value (16000 is an example):CONFIG_TEXT: LimitRequestFieldSize 16000
-
Save the changes and close the file
-
Restart the Apache service to apply the changes:
# systemctl restart apache2
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 (just in case):
# cp -a /etc/httpd/conf/httpd.conf /root/httpd.conf_`date +%F`
-
Open the
/etc/httpd/conf/httpd.conf
file with your favorite command-line text editor -
Add the following line right after the
# Global configuration
line (near the top of the file) and specify your value (16000 is an example):CONFIG_TEXT: LimitRequestFieldSize 16000
-
Save the changes and close the file
-
Restart the Apache service to apply the changes:
# systemctl restart httpd
Note: In case the value of 16000 (16KB) is not enough, increase it to the greater value, for example, 32000 (32KB).
If the website is using nginx-only hosting, apply the following steps:
- Log into Plesk
-
Go to Domains > example.com > Hosting & DNS > Apache & nginx Settings.
-
Add the following line to Additional nginx directives:
large_client_header_buffers 4 16k;
Note: Edit 16k to match whatever request buffer size you need (8k is default), and keep in mind that the larger the buffer size, the greater the negative impact would be in case of a DDOS attack.
- Press Apply
If the website is served by Apache, apply the following steps:
- Log into Plesk
-
Go to Domains > example.com > Hosting & DNS > Apache & nginx Settings.
-
Add the following line to Additional directives for HTTP and Additional directives for HTTPS:
LimitRequestFieldSize 16000
- Press Apply
Comments
1 comment
it's not working
Please sign in to leave a comment.