LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices

Reply
 
Search this Thread
Old 02-21-2008, 07:34 AM   #1
Jugger0s
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 127.0.0.1:4040' 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 127.0.0.1:4040
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,

Jugger0s
 
Old 02-22-2008, 10:57 AM   #2
rayfordj
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 475

Rep: Reputation: 73
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.

Code:
# getenforce
Enforcing
# setenforce 0
# getenforce
Permissive
...restart apache, test, whatever...
# setenforce 1
# getenforce
Enforcing
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, 03:38 PM   #3
Jugger0s
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
 
  


Reply

Tags
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 07:41 AM
SSH and the changing ports it uses ille.pugil42 Linux - Security 2 02-13-2007 06: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 05:11 PM
Tomcat on Apache on Fedora 2 Problems praveengot Linux - Networking 0 10-20-2004 06:28 AM
Changing default ports for smoothwall lhiggins Linux - Newbie 9 04-24-2003 01:12 PM


All times are GMT -5. The time now is 11:15 PM.

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