我通过 Serverpilot 在 Linode 上托管的网站在重启后关闭

我通过 Serverpilot 在 Linode 上托管的网站在重启后关闭

我关闭并打开了通过 Serverpilot 设置的 linode 服务器,因为它正在上线和下线。但是,自从重启后,我就无法访问我的网站了。

我可以通过 FTP 和 SSH 访问文件。但是网站瘫痪了。

它正在使用 letsencpt SSL。

为了解决这个问题,我运行了一些命令:

**I tried to restart nginx and got this**

root@localhost:~# sudo service nginx-sp restart
Job for nginx-sp.service failed because the control process exited with error code. See "systemctl status nginx-sp.service" and "journalctl -xe" for details.


root@localhost:~# systemctl status nginx-sp.service
? nginx-sp.service - nginx-sp
Loaded: loaded (/lib/systemd/system/nginx-sp.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit-hit) since Tue 2021-01-05 08:33:24 UTC; 49s ago
Process: 1928 ExecStartPre=/opt/sp/nginx/sbin/nginx -t (code=exited, status=1/FAILURE)

Jan 05 08:33:23 localhost systemd[1]: nginx-sp.service: Control process exited, code=exited status=1
Jan 05 08:33:23 localhost systemd[1]: Failed to start nginx-sp.
Jan 05 08:33:23 localhost systemd[1]: nginx-sp.service: Unit entered failed state.
Jan 05 08:33:23 localhost systemd[1]: nginx-sp.service: Failed with result 'exit-code'.
Jan 05 08:33:24 localhost systemd[1]: nginx-sp.service: Service hold-off time over, scheduling restart.
Jan 05 08:33:24 localhost systemd[1]: Stopped nginx-sp.
Jan 05 08:33:24 localhost systemd[1]: nginx-sp.service: Start request repeated too quickly.
Jan 05 08:33:24 localhost systemd[1]: Failed to start nginx-sp.
Jan 05 08:33:24 localhost systemd[1]: nginx-sp.service: Unit entered failed state.
Jan 05 08:33:24 localhost systemd[1]: nginx-sp.service: Failed with result 'start-limit-hit'.

命令 sudo nginx-sp -t 返回以下错误

root@localhost:~# sudo nginx-sp -t
nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx-sp/v hosts.d/phoencurrent-ssl.conf:6
nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx-sp/v hosts.d/techswatch-ssl.conf:6
nginx: [warn] the "ssl" directive is deprecated, use the "listen ... ssl" directive instead in /etc/nginx-sp/v hosts.d/thetechminute-ssl.conf:6
nginx: the configuration file /etc/nginx-sp/nginx.conf syntax is ok
nginx: [emerg] open() "/srv/users/serverpilot/log/phoencurrent/dev_nginx.access.log" failed (2: No such file o r directory)
nginx: configuration file /etc/nginx-sp/nginx.conf test failed

非常感谢您对这方面提供的任何帮助。

答案1

我能够通过创建两个新目录来解决该问题,错误消息显示为不存在。

nginx:[emerg] open()“/srv/users/serverpilot/log/phoencurrent/dev_nginx.access.log”失败(2:没有此文件或目录)nginx:配置文件 /etc/nginx-sp/nginx.conf 测试失败

因此,我只需在 /srv/users/serverpilot/log 下创建一个名为 phoencurrent 的新目录。重新启动 Nginx,问题现在解决了。

相关内容