0

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.

2
  • 2
    Something is wrong there: That's a very nonstandard installation. I'd start over and install everything again, and for the love of gawd don't try to use a web control panel. Nov 12, 2014 at 19:32
  • @MichaelHampton Thanks for the reply. You're right, its quite non-standard. I started out with a web control panel because that's the only thing I knew. As I learned, I was able to rely on it less as well as discovering the problems it creates. But as of right now, its the only server I have. I am going to try to move everything over to a fresh Digital Ocean Droplet. Any advice? I'm sure there are a few things people about to undertake something like this need to watch out for. I'm not smart enough (yet) to separate out the noise Nov 12, 2014 at 21:37

0

You must log in to answer this question.

Browse other questions tagged .