I am using Centos 5 to run linux server.

I restart the Apache server with this command

service httpd restart

Usually, it works fine. It didn't work at this time and showed me this error.

yum install php-devel 

I believe I used 'yum' to install php-devel

httpd (À»)¸¦ ½ÃÀÛ Áß: httpd: Could not reliably determine the server's fully qualified domain name, using for ServerName
(98)Address already in use: make_sock: could not bind to address
no listening sockets available, shutting down
Unable to open logs

I used to have ServerName in httpd.conf file.

I searched google to find the answer and most people said that put 'ServerName localhost'

I did it and got same error message.

The server is running now, but can't restart Apache server.

migrated from stackoverflow.com Jun 16 '12 at 12:09

This question came from our site for professional and enthusiast programmers.


The localhost fix should have ideally solved the problem. Just make sure that where you added the localhost in front of ServerName, that line is not commented.

Also make sure there are no duplicate files of the httpd.conf file. I had the same problem once and when I googled, I found that -

/etc/httpd/conf/httpd.conf and /etc/httpd/conf.d/system-config-httpd.conf

deleting the second one, fixed the issue for me.

If that is not the case, I hope you have already tried this -

instead of direct restart, do

/sbin/service httpd stop
/sbin/service httpd start

If that doesn't work, try

apachectl restart


apache2ctl restart

This ideally shouldn't make a difference, it executes the same command, but worth a try.

  • When I do 'Service httpd retsart', the server use '/etc/httpd/conf/httpd.conf' file instead of using '/usr/local/apache/conf/httpd.conf' file. – Jake Jun 15 '12 at 8:54
  • I used to change '/usr/local/apache/conf/httpd.conf' this file before, and I don't know why it reads the other file. – Jake Jun 15 '12 at 8:54

from your logs it looks like you have two problems:

  1. "Address already in use" error - it seems you have twice specified "Listen" parameter in the apache configuration files.
  2. Unable to open logs - check that apache have rw permissions to log files.

Your Answer

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