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