Created
January 21, 2015 02:25
-
-
Save lovelock/17db85bfbd65aa15fa4c to your computer and use it in GitHub Desktop.
systemd service file for nginx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=The nginx HTTP and reverse proxy server | |
After=sys.og.target network.target remote-fs.target nss-lookup.target | |
[Service] | |
Type=forking | |
PIDFile=/usr/local/openresty/nginx/logs/nginx.pid | |
ExecStartPre=/usr/local/openresty/nginx/sbin/nginx -t | |
ExecStart=/usr/local/openresty/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
this file should be found in /usr/lib/systemd/system directory if you install nginx from distribution binary mirrors. When you build nginx from source, then the file is very useful.