auto-restart nginx if master process is killed

nginx handles restarting workers automatically but the master process
is typically killed by the OOM killer too.
This commit is contained in:
Daniel Micay 2022-09-26 16:03:12 -04:00
parent 320ad2e3a8
commit 36423fb2bc

View File

@ -17,6 +17,8 @@ ProtectProc=invisible
ProtectSystem=strict
ReadWritePaths=/var/lib/nginx /var/log/nginx -/var/cache/nginx
RemoveIPC=true
Restart=always
RestartSec=1
RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
RestrictNamespaces=true
RestrictRealtime=true