Recently I started hosting a few websites for my brother. These websites happen to be running installations of phpBB forums. A lot of users were getting a “502 Bad Gateway” Nginx error when they crated a new post or replied to a post.
The way I fixed the 502 Bad Gateway error on my Media Temple DV server is:
- Navigate to and open ‘/etc/nginx/nginx.conf’
- Find ‘server_tokens’
- Paste the following after it
123proxy_buffer_size 128k;proxy_buffers 4 256k;proxy_busy_buffers_size 256k;
- Save and close the file
- Restart nginx
That’s it! Everything should be smooth sailing from there.