Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
425 views
in Technique[技术] by (71.8m points)

php - 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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...