表单: LinuxNotes
用户: dreamable
创建日期: 2023-06-28 07:41:42 UTC
更新日期: 2023-06-28 07:41:42 UTC
引用:(Table ID 28, Record ID 12)

标题 :
如何自动重启nginx
笔记 :

服务器nginx偶尔会被杀死,可能是系统资源不够了。

sudo systemctl edit nginx then paste in:

[Service]
Restart=always

check if it works

sudo systemctl status nginx
sudo pkill -f nginx
sudo systemctl status nginx
标签: