Skip to content

Instantly share code, notes, and snippets.

@mattantonelli
Last active November 24, 2024 21:07
Show Gist options
  • Save mattantonelli/02f60a268039606e1925e05543391a04 to your computer and use it in GitHub Desktop.
Save mattantonelli/02f60a268039606e1925e05543391a04 to your computer and use it in GitHub Desktop.
systemd service file for NGNIX installed via Ruby Passenger gem
[Unit]
Description=The NGINX HTTP and reverse proxy server
After=syslog.target network.target remote-fs.target nss-lookup.target
[Service]
Type=forking
PIDFile=/run/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=false
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment