Skip to content

Instantly share code, notes, and snippets.

@betapcode
Created December 28, 2017 10:43
Show Gist options
  • Save betapcode/eeb54b2b3614f9c519d59cb83fb54cc6 to your computer and use it in GitHub Desktop.
Save betapcode/eeb54b2b3614f9c519d59cb83fb54cc6 to your computer and use it in GitHub Desktop.
ubuntu 16 nginx.service
[Unit]
Description=The NGINX HTTP and reverse proxy server
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
PIDFile=/var/run/nginx.pid
ExecStartPre=/usr/sbin/nginx -t
ExecStart=/usr/sbin/nginx
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s QUIT $MAINPID
PrivateTmp=true
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment