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.