Admins eHow SysAdmin Tips & Tricks

January 11, 2012

Fix nginx 502 Bad Gateway error

Filed under: General — Tags: , , , , — admin @ 11:01 am

Today I was getting “502 Bad Gateway” on a Glype proxy installation , after digging into the problem I found out it is a problem of nginx fastcgi buffers , here is how to fix it :
open /etc/nginx/nginx.conf
add the following lines into http section :

fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;

you config should look like this :

http {
fastcgi_buffers 8 16k;
fastcgi_buffer_size 32k;

restart nginx and fastcgi.

  • Naknak_kenji

    where i can find that nginx???how can i open that???

  • Latika

    on your terminal write,
    cd /etc/nginx/nginx.conf

  • tazz

    doesn’t open on my mac help me plz

  • Valent_angkringan

    @tazz you can open terminal on mac and you can use editor “vi”, example # vi /etc/nginx/nginx.conf

  • JBGO

    Excellent !!!! Thank you so much !!!

  • Ajay

    how to use it

  • markzero

    Helped! Thanks! Needed to restart nginx only

Powered by WordPress