I have a Centos 6.5 server that came with Apache pre-installed. I was having problems with Apache clashing with nginx, presumably because they both default to listening on port 80. I went through the motions to prevent httpd from restarting itself automatically.
Here is the chkconfig line from httpd and nginx:
httpd 0:off 1:off 2:off 3:off 4:off 5:off 6:off
nginx 0:off 1:off 2:on 3:on 4:on 5:on 6:off
but every ~3 weeks or so, I get calls saying my sites are down. I restart nginx (sudo /etc/init.d/nginx restart
) and see
Stopping nginx: [ FAILED ]
Starting nginx: [ OK ]
I am at a loss where to look for what is causing nginx to die. Are there tools to monitor nginx and restart it if it dies? How could I identify why it shuts down?
I do not have a apache
or httpd
folder in /var/log/
. Also strange is when I type
[arguably@server ~]$ sudo httpd -S
I get
/usr/sbin/httpd: line 97: /usr/local/apache/bin/httpd: Permission denied
I thought sudo could do everything.