-   Linux - Newbie (
-   -   Problems changing Apache 2.2 ports in Fedora 8 (

Jugger0s 02-21-2008 07:34 AM

Problems changing Apache 2.2 ports in Fedora 8
Hello, I'm having a strange problem that I'm totally stuck on. What I am trying to do is open my test website to the world, I've opened up my ports on my router and thats been tested externally. Now I need to change the port that my website is accessible to. I want to use a non-standard port of 4040.

so as 'Root' I've gone into /etc/httpd/conf
Then 'Nano httpd.cnf'
Searched down the file and found 'Listen 80'
I changed it to 'Listen' for testing.
saved and then typed '/usr/sbin/apachectl -k graceful' to restart the service. Here is where I get my problem. I get the following error message.

httpd not running, trying to start
(13)Permission denied: make_sock: could not bind to address
no listening sockets available, shutting down
Unable to open logs

I'm not totally stuck, I've been searching the internet for 2 days now for something to work, but nothing has, everything is for other versions of Apache it seems.

Thanks for your help,


rayfordj 02-22-2008 10:57 AM

This is most likely due to SELinux enforcing. To confirm this you can temporarily set it passive and then test. If it works then you've identified the culprit and can modify your selinux policy to let apache bind to port 4040.


# getenforce
# setenforce 0
# getenforce
...restart apache, test, whatever...
# setenforce 1
# getenforce

You could also look in your logs for sealert entries.

I dont have the command off-hand to make the mod to allow httpd on :4040. I'll edit if/when I dig it up.

Jugger0s 02-22-2008 03:38 PM

Re: Problems changing Apache 2.2 ports in Fedora 8
Truly you are a Genius! It worked perfectly, I managed to find the correct location to edit the correct file and made it passive and it was perfect when I restarted the server.

Thanks a million,

Gareth Jones

All times are GMT -5. The time now is 02:28 PM.