WordPress:Nginx中发生错误 [英] Wordpress: An error occurred in nginx

查看:287
本文介绍了WordPress:Nginx中发生错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在DigitalOcean上启动了一个wordpress网站,并使用本教程安装了wordpress

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

第二天,我的wordpress网站出现故障,出现以下错误.

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.

忠实的,nginx."

Faithfully yours, nginx."

如果我重新启动php5-fpm,它会工作几分钟,直到出现相同的错误页面.

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.

如何解决这个问题?

更新

错误:connect()到unix:/var/run/php5-fpm.sock失败

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

我尝试了此链接中的所有操作

I tried everything from this link here but nothing worked

推荐答案

@TZHX感谢您的回复.我找到了解决此问题的方法.

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

这是蛮力攻击.垃圾邮件发送者正在使用xmlrpc.php.

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

由于攻击,我收到了此错误

Because of the attack I got this error

与unix的connect():/var/run/php5-fpm.sock失败(11:资源 暂时不可用)"

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

我只是在配置文件中阻止了对xmlrpc.php的访问,并重新启动了服务.

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

现在我的网站正在运行,没有任何问题.下面是阻止xmlrpc.php的配置.

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

打开"/etc/nginx/sites-available/wordpress"并添加以下几行.

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!

这篇关于WordPress:Nginx中发生错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆