Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 02-21-2008, 06:34 AM   #1
LQ Newbie
Registered: Feb 2008
Posts: 2

Rep: Reputation: 0
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,

Old 02-22-2008, 09:57 AM   #2
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 488

Rep: Reputation: 78
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.
Old 02-22-2008, 02:38 PM   #3
LQ Newbie
Registered: Feb 2008
Posts: 2

Original Poster
Rep: Reputation: 0
Talking 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


apache22, configuration, fedora 8, port, selinux

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing ports enoute Tom Douglas Linux - Networking 13 02-17-2008 06:41 AM
SSH and the changing ports it uses ille.pugil42 Linux - Security 2 02-13-2007 05:22 PM
Apache 1.3.33 (debian built) and Apache SSL does not respond to the proper ports lqorg_user Linux - Networking 0 11-06-2005 04:11 PM
Tomcat on Apache on Fedora 2 Problems praveengot Linux - Networking 0 10-20-2004 05:28 AM
Changing default ports for smoothwall lhiggins Linux - Newbie 9 04-24-2003 12:12 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:44 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration