502 Bad Gateway Nginx Error on a Media Temple DV Server

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.

I did some research and a possible solution, that worked for me, is to edit your nginx.conf and tweak these buffer variables: proxy_buffer_sizeproxy_buffersproxy_busy_buffers_size.

The way I fixed the 502 Bad Gateway error on my Media Temple DV server is:

  1. Navigate to and open ‘/etc/nginx/nginx.conf’
  2. Find ‘server_tokens’
  3. Paste the following after it
  4. Save and close the file
  5. Restart nginx

That’s it! Everything should be smooth sailing from there.

, ,

4 Responses to 502 Bad Gateway Nginx Error on a Media Temple DV Server

  1. 10na March 11, 2014 at 4:56 pm #

    Thanks, big help, this worked for me perfectly.

    Restarted this way:

    # service nginx restart

    for anyone else inexperienced

  2. 10na March 11, 2014 at 4:58 pm #

    Oh, and there is a typo (ngibx rather than nginx) for anyone copying & pasting & getting an error:

    Navigate to and open ‘/etc/ngibx/nginx.conf’

    should be


    • Alex Fernandez March 11, 2014 at 8:36 pm #

      Glad I could help!

      Darn typos, fixed. Thanks for pointing that out!

  3. Rob November 12, 2014 at 4:43 pm #

    Thanks for the tip, works perfectly for me too!

Leave a Reply