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