[Unit] Description=The nginx HTTP and reverse proxy server After=network.target remote-fs.target nss-lookup.target [Service] Type=forking PIDFile=/run/nginx/nginx.pid RuntimeDirectory=nginx ExecStartPre=/usr/sbin/nginx -t ExecStart=/usr/sbin/nginx ExecStartPost=/bin/sleep 0.1 ExecReload=/bin/kill -HUP $MAINPID ExecStop=/bin/kill -QUIT $MAINPID [Install] WantedBy=multi-user.target