Skip to content

Instantly share code, notes, and snippets.

@j3ck
Created December 19, 2016 21:38
Show Gist options
  • Select an option

  • Save j3ck/2d5d1e2638194570c47b7fa0137c7496 to your computer and use it in GitHub Desktop.

Select an option

Save j3ck/2d5d1e2638194570c47b7fa0137c7496 to your computer and use it in GitHub Desktop.
# /lib/systemd/system/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=/opt/nginx/logs/nginx.pid
ExecStartPre=/opt/nginx/sbin/nginx -t
ExecStart=/opt/nginx/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