简体   繁体   中英

Wordpress: An error occurred in nginx

I launched a wordpress website on DigitalOcean, installed wordpress using this tutorial here !

Next day my wordpress site was down and I got the below error.

"An error occurred.

Sorry, the page you are looking for is currently unavailable. Please try again later.

If you are the system administrator of this resource then you should check the error log for details.

Faithfully yours, nginx."

If i restart php5-fpm , it works for few minutes and after I am getting the same error page.

I searched for possible solutions, but I couldn't find anything.

how to solve this?

Update

Error : connect() to unix:/var/run/php5-fpm.sock failed

I tried everything from this link here but nothing worked

@TZHX Thanks for the Reply. I found the solution to solve this.

It was a Brute Force attack. Spammers were using xmlrpc.php.

Because of the attack I got this error

"connect() to unix:/var/run/php5-fpm.sock failed (11: Resource temporarily unavailable)"

I just blocked the access to my xmlrpc.php in the config file and restarted the services.

Now my site is running without any problem. Below is the config to block xmlrpc.php.

Open "/etc/nginx/sites-available/wordpress" and add the following lines.

# Block xmlrpc.php access
    location = /xmlrpc.php {
            deny all;
            }

After saving it. Restart the services.

sudo service nginx restart
sudo service php5-fpm restart

Hope it might help someone!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM