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