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