0

I got some problems restarting Apache with 2000 virtual hosts.

I use Apache 2.2.22 + PHP 5.4.6 on CentOS 5.8 64-bit.

When I try to restart it displays this:

    /etc/init.d/httpd restart
Stopping httpd:                                       [FAILED]
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
                                                           [FAILED]

When I do killall -9 httpd it ok then for some time and then it happens again :/

  • In CentOS, you can just use the service command to stop|start|reload|restart|graceful, etc. E.g. service httpd restart. Just FYI. – tacotuesday Aug 25 '12 at 19:14
1

It looks to me as if Apache wasn't running to begin with, at least not under the PID that the init script started it under. Check (or provide here) the output of "ps auxwww".

My strongest intuition says that your apache root process is dying, leaving the children alive and listening on port 80. If so, look in your apache error log, and the system logs, to see what is killing the root process.

Other possibilities: you might have something else starting apache manually outside of the init script, or something else might be listening on port 80 (but that wouldn't explain why killall -9 httpd works).

| improve this answer | |
  • So far it's ok now: /etc/init.d/httpd start Starting httpd: and so do not display anything which means it's up and running :) – Spacedust Aug 24 '12 at 20:20
0

It was package issue. I've got httpd from webtactic repo. Changed to the one from Lxcenter and working very well ;)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.