已将wordpress_http.conf更改为SSL,nginx现在无法启动

时间:2019-11-08 16:18:11

标签: wordpress nginx vps

我正在使用Vultr VPS,并且遵循了本教程-https://www.vultr.com/docs/install-lets-encrypt-ssl-on-one-click-wordpress-app

一切似乎都能正确安装,我从以下位置更改了两个(http和https)配置文件:

    listen 80 default_server;
    server_name_;
    #server_name wordpress.example.com;

    listen 80 default_server;
    server_name www.mywebsite.com;
    #server_name wordpress.example.com;

最后将其添加到http

if ($scheme = http) {
    return 301 https://$server_name$request_uri;
}

每当我尝试重新启动Nginx时,都会出现此错误,指出对root的身份验证不正确?没有提示我输入密码,我已经以root用户身份登录。

> -- Unit nginx.service has failed.
> -- 
> -- The result is RESULT. Nov 08 16:14:48 Above-Media-Team sshd[10921]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0
> tty=ssh ruser= rhost=2 Nov 08 16:14:51 Above-Media-Team sshd[10921]:
> Failed password for root from 218.92.0.203 port 57531 ssh2 Nov 08
> 16:14:53 Above-Media-Team sshd[10921]: Failed password for root from
> 218.92.0.203 port 57531 ssh2 Nov 08 16:14:56 Above-Media-Team sshd[10921]: Failed password for root from 218.92.0.203 port 57531
> ssh2 Nov 08 16:14:56 Above-Media-Team sshd[10921]: Received disconnect
> from 218.92.0.203 port 57531:11:  [preauth] Nov 08 16:14:56
> Above-Media-Team sshd[10921]: Disconnected from authenticating user
> root 218.92.0.203 port 57531 [preauth] Nov 08 16:14:56
> Above-Media-Team sshd[10921]: PAM 2 more authentication failures;
> logname= uid=0 euid=0 tty=ssh ruser= rhost=218.92.0.2 Nov 08 16:15:03
> Above-Media-Team sshd[10936]: Invalid user yp from 103.10.30.204 port
> 50794 Nov 08 16:15:03 Above-Media-Team sshd[10936]:
> pam_unix(sshd:auth): check pass; user unknown Nov 08 16:15:03
> Above-Media-Team sshd[10936]: pam_unix(sshd:auth): authentication
> failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=1

我似乎无法弄清楚,任何帮助将不胜感激。

1 个答案:

答案 0 :(得分:0)

您似乎正在将Nginx作为服务运行(新贵?)。看起来此服务最初是作为非特权用户yp运行的。它正在尝试提高其特权,但是因为密码设置不正确而不能。

在没有看到您的服务的完整配置的情况下,我无法具体告诉您出了什么问题,但是我会在配置中查找将用户名设置为root以外的任何内容。