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