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