Nginx cannot be enabled. proxy_temp_file_write_size must be equal to or greater than the maximum of the value of proxy_buffer_size and one of the proxy_buffers

Created:

2016-12-12 03:48:00 UTC

Modified:

2017-08-08 13:39:11 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Nginx cannot be enabled. proxy_temp_file_write_size must be equal to or greater than the maximum of the value of proxy_buffer_size and one of the proxy_buffers

Applicable to:

  • Plesk 12.5 for Linux

Symptoms

  • Apache is down

  • Nginx cannot be enabled with the following error:

    $ /usr/local/psa/admin/bin/nginxmng -e

    nginx: configuration file /etc/nginx/nginx.conf test failed

    file: /usr/local/psa/admin/plib/Template/Writer/Webserver/Abstract.php
    line: 75
    code: 0
    nginx: [emerg] "proxy_temp_file_write_size" must be equal to or greater than the maximum of the value of "proxy_buffer_size" and one of the "proxy_buffers" in /etc/nginx/nginx.conf:39
    nginx: configuration file /etc/nginx/nginx.conf test failed

Cause

The proxy_buffer_size or proxy_buffers value for one of the domains is grater then minimal proxy_temp_file_write_size value

Resolution

  1. Find minimal proxy_temp_file_write_size value:

    # grep -R "proxy_temp_file_write_size" /var/www/vhosts/system/*
  2. Find all values which are fewer than minimal proxy_temp_file_write_size :

    # grep -R "proxy_buffer_size" /var/www/vhosts/system/* 
    # grep -R "proxy_buffers" /var/www/vhosts/system/*
  3. Decrease all found values to the minimal value of proxy_temp_file_write_size in domain's configuration file:

     # vi /var/www/vhosts/system/example.com/conf/vhost_nginx.conf
Have more questions? Submit a request
Please sign in to leave a comment.