Articles in this section

Pages of a website hosted in Plesk fail to load: Size of a request header field exceeds server limit

Plesk for Linux kb: technical

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

For Apache on Debian-based distributions (all domains)
  1. Connect to the Plesk server via SSH

  2. Create a backup of the Apache configuration file (just in case):

    # cp /etc/apache2/apache2.conf /etc/apache2/apache2.conf_`date +%F`

  3. Open the /etc/apache2/apache2.conffile with your favorite command-line text editor

  4. 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

  5. Save the changes and close the file

  6. 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).

For Apache on RHEL-based distributions (all domains)
  1. Connect to the Plesk server via SSH

  2. Create a backup of the Apache configuration file (just in case):

    # cp -a /etc/httpd/conf/httpd.conf /root/httpd.conf_`date +%F`

  3. Open the /etc/httpd/conf/httpd.conf file with your favorite command-line text editor

  4. 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

  5. Save the changes and close the file

  6. 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).

For one website served by nginx only (single domain)

If the website is using nginx-only hosting, apply the following steps:

  1. Log into Plesk
  2. Go to Domains > example.com > Hosting & DNS > Apache & nginx Settings.

  3. 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.

  4. Press Apply
For one website served by Apache (single domain)

If the website is served by Apache, apply the following steps:

  1. Log into Plesk
  2. Go to Domains > example.com > Hosting & DNS > Apache & nginx Settings.

  3. Add the following line to Additional directives for HTTP and Additional directives for HTTPS:

    LimitRequestFieldSize 16000

  4. Press Apply
Was this article helpful?

Comments

1 comment
Date Votes

Please sign in to leave a comment.