Wordpress: An error occurred in nginx

拥有回忆 提交于 2019-12-25 20:03:05

问题


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


回答1:


@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!



来源:https://stackoverflow.com/questions/36909355/wordpress-an-error-occurred-in-nginx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!