Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I've installed CentOS 6.3 and i run the command

yum install httpd

after successfully installed I've typed in the terminal

service httpd start

nothing happend i did opened the browser and typed my ip address but Unable to connect

Note:

know I've reinstalled httpd

when i run

service httpd start

message displayed

Starting httpd: no listening sockets available, shutting down

Unable to open logs

please help

share|improve this question
1  
Your Apache logs can be found in /var/log/httpd. What does the error log say? –  larsks Dec 27 '12 at 23:41
    
Little bit confusing, you say it won't start then you say you a 404, a 404 would suggest that it is running. Do you see the httpd process when you do a "ps aux"? If not then what does the error log show (/var/log/httpd/error.log)? –  Epaphus Dec 27 '12 at 23:41
    
i'm sorry Unable to connect message is displayed in mozilla lol –  prof Dec 27 '12 at 23:47
    
there is no error.log file –  prof Dec 27 '12 at 23:51
    
Ah might be error_log, should be an error log /var/log/httpd folder. If not try running "httpd" in a terminal and it should give an output in the terminal –  Epaphus Dec 28 '12 at 0:00

4 Answers 4

There could be few issues over here.

  1. Selinux -selinux is enabled in your machine, and that is preventing from starting the Apache. You can try disabling selinux and try restarting the httpd. You can do that by this command setenforce 0

  2. You are not running this command with root privileges. To do that, use sudo and execute the command like this $ sudo service httpd start

  3. Also, there might be something already running on port 80. To check that use this command netstat -npl | grep 80 If this command is showing something then that means some other application is running on that port.

One last thing you can try is that, you have already http running, and the connection is refused may be because of some firewall or something else.

To check the same, use command with restart and simply with start.

So, give this command $ sudo service httpd restart

If this command doesn't give any error this time, which you are seeing normally, that means that httpd is running but the connection refused is may be because of something else.

share|improve this answer
    
I've tried all what you said but the same error service httpd start Starting httpd: no listening sockets available, shutting down Unable to open logs [FAILED] –  prof Dec 28 '12 at 15:05
    
Can you tell me what do you see in the error logs –  GeekRide Dec 28 '12 at 15:07
up vote 2 down vote accepted

I've Solved the problem thank you guys

i did run

yum update

then removed the httpd

yum erase httpd

then install it again

yum install httpd

and typed

service httpd start

everything is ok and working

share|improve this answer

Make sure your /etc/hosts file is configured with a fully-qualified domain name and the server's IP address, as per this suggestion.

/etc/hosts:

127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6

172.16.100.13   Rizzo.ifp.com rizzo
share|improve this answer
    
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 172.16.100.13 Rizzo.ifp.com rizzo –  prof Dec 28 '12 at 0:51

Looks like there is an issue with libaprutil, I believe it is provided by the apr package on CentOS 6.3

yum reinstall apr-util

If that fails then try

yum provides libaprutil-1.so.0

Which will give you correct package to install/reinstall

share|improve this answer
    
Starting httpd: no listening sockets available, shutting down Unable to open logs –  prof Dec 28 '12 at 0:39
    
That would suggest it is running or something else is listen is on the port httpd is wanting to use (TCP 80 by default) You can see what is running on port 80 by using the command "netstat -tpln" –  Epaphus Dec 28 '12 at 13:51

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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