Description of problem: Nginx is unable to start due to an error in the systemd service file. /usr/lib/systemd/system/nginx.service It has PIDFile=/run/nginx.pid which should have been PIDFile=/var/run/nginx.pid Version-Release number of selected component (if applicable): nginx-1.6.1-2.el7.x86_64 How reproducible: Always Steps to Reproduce: 1. yum install nginx 2. configure nginx 3. systemctl start nginx.service Actual results: [root@web02 sysconfig]# systemctl start nginx.service Job for nginx.service failed. See 'systemctl status nginx.service' and 'journalctl -xn' [root@web02 sysconfig]# systemctl status nginx.service nginx.service - The nginx HTTP and reverse proxy server Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled) Active: failed (Result: timeout) since Fri 2014-08-15 11:56:27 UTC; 7s ago Aug 15 11:54:48 web02 nginx[9497]: nginx: the configuration file /etc/nginx/nginx.conf s Aug 15 11:54:48 web02 nginx[9497]: nginx: configuration file /etc/nginx/nginx.conf test Aug 15 11:54:48 web02 systemd[1]: PID file /run/nginx.pid not readable (yet?) after star Aug 15 11:56:27 web02 systemd[1]: nginx.service operation timed out. Terminating. Aug 15 11:56:27 web02 systemd[1]: Failed to start The nginx HTTP and reverse proxy serve Aug 15 11:56:27 web02 systemd[1]: Unit nginx.service entered failed state. Expected results: [root@web02 sysconfig]# systemctl start nginx.service [root@web02 sysconfig]# ps ax|grep nginx 9542 ? Ss 0:00 nginx: master process /usr/sbin/nginx 9543 ? S 0:00 nginx: worker process Additional info:
/run/nginx.pid is the default. You changed it yourself to /var/run/nginx.pid.