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