FedoraSystemdServiceFile
(Difference between revisions)
Jamielinux (Talk | contribs) m |
Jamielinux (Talk | contribs) m |
||
| (One intermediate revision by one user not shown) | |||
| Line 1: | Line 1: | ||
= Fedora Nginx systemd service file = | = Fedora Nginx systemd service file = | ||
Should work on Fedora, OpenSUSE, Arch Linux. Tested on Fedora 16 and 17. | Should work on Fedora, OpenSUSE, Arch Linux. Tested on Fedora 16 and 17. | ||
| + | |||
| + | The location of the PIDFile and the nginx binary may be different depending on how nginx was compiled. | ||
Save this file as /lib/systemd/system/nginx.service | Save this file as /lib/systemd/system/nginx.service | ||
| Line 6: | Line 8: | ||
<geshi lang="bash"> | <geshi lang="bash"> | ||
[Unit] | [Unit] | ||
| − | Description= | + | Description=The nginx HTTP and reverse proxy server |
After=syslog.target network.target remote-fs.target nss-lookup.target | After=syslog.target network.target remote-fs.target nss-lookup.target | ||
Latest revision as of 20:15, 16 May 2012
[edit] Fedora Nginx systemd service file
Should work on Fedora, OpenSUSE, Arch Linux. Tested on Fedora 16 and 17.
The location of the PIDFile and the nginx binary may be different depending on how nginx was compiled.
Save this file as /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=/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










