[Unit]
Description=The nginx HTTP and reverse proxy server
After=network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
PIDFile=/export/servers/nginx/nginx.pid
ExecStartPre=/usr/bin/rm -f /export/servers/nginx/nginx.pid
ExecStartPre=/usr/sbin/nginx -t -c /export/servers/nginx/etc/nginx.conf
ExecStart=/usr/sbin/nginx -c /export/servers/nginx/etc/nginx.conf
ExecReload=/bin/kill -s HUP $MAINPID
KillSignal=SIGQUIT
TimeoutStopSec=5
KillMode=process
PrivateTmp=true
[Install]
WantedBy=multi-user.target
systemctl restart nginx.service