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