IT Knowledge Base

Technical Repository

HowTo: Nginx/PHP, Fix the “Upstream sent too big header while reading” error

tail -f /usr/local/nginx/logs/error.log [error] 17142#0: *4 upstream sent too big header while reading response header from upstream Add this to your http {} of the nginx.conf file normally located at /etc/nginx/nginx.conf: proxy_buffer_size 128k; proxy_buffers 4256k; proxy_busy_buffers_size 256k; Then add this to your php location block, this will be located in your vhost file look for the block that begins with location […]

Read More


HowTo: Update Nginx Configuration to support PHP files

These are the default settings for Nginx. Open /usr/local/nginx/conf/nginx.conf to edit. nano /usr/local/nginx/conf/nginx.conf location ~ \.php$ { root html; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name; include fastcgi_params; } Update the nginx.conf file to these settings location ~ \.php$ { root /var/www; fastcgi_pass unix:/var/run/php5-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } In order to use […]

Read More