我透過 Serverpilot 託管在 Linode 上的網站在執行重新啟動後關閉了

我透過 Serverpilot 託管在 Linode 上的網站在執行重新啟動後關閉了

我關閉並打開了透過 Serverpilot 設定的 linode 伺服器,因為它處於線上和離線狀態。但是,自從重新啟動後,我無法訪問我的網站。

我可以透過 FTP 和 SSH 存取檔案。但是,該網站已關閉。

它使用的是letencpt 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,問題現已解決。

相關內容