5188b7
[Unit]
5188b7
Description=The nginx HTTP and reverse proxy server
5188b7
After=network-online.target remote-fs.target nss-lookup.target
5188b7
Wants=network-online.target
5188b7
5188b7
[Service]
5188b7
Type=forking
5188b7
PIDFile=/run/nginx.pid
5188b7
# Nginx will fail to start if /run/nginx.pid already exists but has the wrong
5188b7
# SELinux context. This might happen when running `nginx -t` from the cmdline.
5188b7
# https://bugzilla.redhat.com/show_bug.cgi?id=1268621
5188b7
ExecStartPre=/usr/bin/rm -f /run/nginx.pid
5188b7
ExecStartPre=/usr/sbin/nginx -t
5188b7
ExecStart=/usr/sbin/nginx
5188b7
ExecReload=/usr/sbin/nginx -s reload
5188b7
KillSignal=SIGQUIT
5188b7
TimeoutStopSec=5
5188b7
KillMode=mixed
5188b7
PrivateTmp=true
5188b7
5188b7
[Install]
5188b7
WantedBy=multi-user.target