Research techniques,Your Favourite DigTech Blog

digtech.org

How to fix error Nginx “502 Bad Gateway”

July 13, 2015 by Dig Tech

4.6/5 - (899 votes)

Today I will post article “The fix error 502 Bad Gateway for Nginx”.This error can be called “WordPress Xmlrpc vulnerability”. This could be that your server is compromised. you are getting a lot of requests to your xmlrpc.php file. and its keeping your server out of resources.

502-bad-gateway

You check the log and if it appears the following error:

2015/07/22 16:56:16 21550#0: *24455 upstream sent unexpected FastCGI record: 3 while reading response header from upstream, client: xxxx.xxx.xx.xx, server: xxx, request: “POST /xmlrpc.php HTTP/1.0″, upstream: “xxx.xxx.xx.xx., host: “xxx.xxx.xxx.xxx”

 

What to do?

1. After doing a simple Google search I solved the problem by adding two lines to Nginx configuration file/etc/nginx/nginx.conf :

If you use centminmod url see here: /usr/local/nginx/nginx.conf

http {
    ...
    fastcgi_buffers 8 16k;
    fastcgi_buffer_size 32k;
    ...
}

2. Disable plugin Example: iThemes Security,use rename the folder better-wp-security

3. Default nginx config file will be located at /etc/nginx/sites-available/default, you can add the below lines in server context.
location ^~ /xmlrpc.php {
deny all;
}

Centminmod: Go to /usr/local/nginx/conf/conf.d/domain.com.conf

Add row:  location ^~ /xmlrpc.php { deny all;}

at 

server {

... }

Now restart nginx using below command.

service nginx restart

Good luck!

  • Share on Facebook
  • Tweet on Twitter
  • Share on LinkedIn
More:  Reviews: iPhone 5C is a cheaper, more plastic than iPhone

Maybe You Like

Genesis Framework 6 layouts
Genesis Framework is a perfect WordPress Theme Technologies
Unleashing the Fun: Exploring the Limitless Universe with Galacticraft 1.12.2
The Ultimate Review of the Top Online Content Creation Tools for Professionals
Boost Your Live Streaming Game: A Comprehensive Guide to Master Streamyard and Hone Your Broadcast Skills
Maximizing Your Content Creation with the Top AI Tools: A Comprehensive Guide
Discover the Best Low Minecraft Shaders for Stunning Graphics: Top Picks Ranging from Minimalistic to Realistic

Reader Interactions

Leave a Reply

You must be logged in to post a comment.

Primary Sidebar

Featured Posts

Latest news about Taylor Swift and Travis Kelce

The Expendables 4 Disappoints with Outdated Plot, Fails to Utilize A-List Cast

The Versatile Talents of Jamie Foxx: A Closer Look at His Expansive Career

An In-depth Analysis of Taylor Swift’s Impact on the Music Industry

A Comprehensive Analysis: Comparing Ronaldo and Messi – Unraveling the Legends

Ads

Tools Minecraft

Pokeradar 1.16.5
Orespawn 1.8.9
Copious dogs mod 1.12.2
Pixelmon radar mod 1.16.5
Loot++ 1.12.2

Footer

About

digtech logo home Research Methods News, Reviews, and Analysis. Technology News, Your Preferred DigTech Blog. Digtech.org is a blog for IT!

Helpful Links

  • Contact Us
  • Privacy Policy
  • About
  • Create Your Own Post

Site Statistics

  • 1,235 Top Trending Topics
  • 658  Popular on Digtech channel
  • 5,101,579 Submission Views
  • 38,278 Trending searches today

Copyright © 2023 - Digtech Media Private Limited.
Digtech.org is neither affiliated with nor endorsed by any brands or trademarks on this site unless explicitly stated.