Related Solutions
There could be few issues over here.
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
You are not running this command with root privileges. To do that, use sudo and execute the command like this $ sudo service httpd start
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.
I ran into the same problem on openSuse 13.1 after upgrading to Mono 3.2 and apache 2.4
The problem for me was actually a simple permission problem, my htdocs directory was not accessible by the mod-mono-server process.
I am using the User and Group directives of apache to set the ownership of the apache process. Previously, these settings where inherited by mod-mono-server, but this doesn't work in apache-2.4 due to a bug in mod_mono. You can check the user and group id mod-mono-server is running under with:
ps ax -o pid,user,group,ruser,rgroup,args|grep mono
Related Solutions
There could be few issues over here.
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
You are not running this command with root privileges. To do that, use sudo and execute the command like this
$ sudo service httpd start
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.
I ran into the same problem on openSuse 13.1 after upgrading to Mono 3.2 and apache 2.4 The problem for me was actually a simple permission problem, my htdocs directory was not accessible by the mod-mono-server process.
I am using the User and Group directives of apache to set the ownership of the apache process. Previously, these settings where inherited by mod-mono-server, but this doesn't work in apache-2.4 due to a bug in mod_mono. You can check the user and group id mod-mono-server is running under with:
ps ax -o pid,user,group,ruser,rgroup,args|grep mono
Best Answer
This ended up being something specific to my computer and am moving on.