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 :/

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

2 Answers 2

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).

1
  • 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, 2012 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 ;)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .