Fix Nginx start stop frequenly
Tác giả: Dương Nguyễn Phú Cường
Ngày đăng: 2 tuần trước
Lượt xem: 20
My server worked with these changes:
CODE: SELECT ALL
Paste this:
# nano /etc/sysctl.d/disable_ipv6.conf
CODE: SELECT ALL
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
CODE: SELECT ALL
Find:
# nano /usr/lib/systemd/system/nginx.service
CODE: SELECT ALL
Replace with:
PIDFile=/var/run/nginx.pid
CODE: SELECT ALL
PIDFile=/run/nginx.pid
CODE: SELECT ALL
Find:
# nano /etc/nginx/nginx.conf
CODE: SELECT ALL
Replace with:
pid /var/run/nginx.pid;
CODE: SELECT ALL
pid /run/nginx.pid;
CODE: SELECT ALL
# systemctl daemon-reload
# reboot