LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-18-2005, 11:46 PM   #1
mikeghet
Member
 
Registered: Aug 2004
Location: USofA
Distribution: fedora core < SUSE
Posts: 70

Rep: Reputation: 15
why won't Apache accept any additional Listen ports?


Before I 'upgraded[cough]' to FC4 from FC3 I was able to add additional ports to listen to in my httpd.conf file by adding:

Listen port#
Listen port#

etc etc...

Now, even changing the defaul Listen 80
to somethign different doesn't work, nevermind adding more ports.

service httpd restart gives [failed] on return...not line number or anything. Now I know it used to....after putting FC4 and upgrading to the latest kernel, I also updated the apache to whatever version up2date had....

any takers?

Last edited by mikeghet; 10-19-2005 at 11:17 AM.
 
Old 10-18-2005, 11:55 PM   #2
mikeghet
Member
 
Registered: Aug 2004
Location: USofA
Distribution: fedora core < SUSE
Posts: 70

Original Poster
Rep: Reputation: 15
Code:
# httpd -v
Server version: Apache/2.0.54
Server built:   Sep  2 2005 11:54:18
that's my version obviously


[Tue Oct 18 22:30:02 2005] [notice] caught SIGTERM, shutting down

and above is my lovely and not useful error line in my error log..

Last edited by mikeghet; 10-19-2005 at 12:25 AM.
 
Old 10-19-2005, 11:12 AM   #3
mikeghet
Member
 
Registered: Aug 2004
Location: USofA
Distribution: fedora core < SUSE
Posts: 70

Original Poster
Rep: Reputation: 15
Question

Nobody, eh?
 
Old 10-19-2005, 06:18 PM   #4
mikeghet
Member
 
Registered: Aug 2004
Location: USofA
Distribution: fedora core < SUSE
Posts: 70

Original Poster
Rep: Reputation: 15
http://httpd.apache.org/docs/2.0/bind.html

apach 2.0 supposedly supports this, just as the 1.3versions, but 2.0 doesn't actually work.

I just tried using multiple Listens on another brand new FC4 install and httpd just won't start. the error log, again, reports:

"[Wed Oct 19 16:17:10 2005] [notice] caught SIGTERM, shutting down"

Anyone on here ever use Apache and the Listen directive?
 
Old 10-19-2005, 06:34 PM   #5
paranoid times
Member
 
Registered: Jan 2005
Distribution: Fedora Core 3, 4
Posts: 135

Rep: Reputation: 16
have you tried using "system-config-httpd" I switched from port 80 to 8080 with that to get through the firewall here, and it worked fine for me. it has an "add" feature, which may also allow you to add more ports. it works for me on FC4

Good Luck
-Michael
 
Old 10-19-2005, 08:19 PM   #6
aznluvsmc
Member
 
Registered: Aug 2004
Location: Newmarket, Ontario
Distribution: OpenSuse 10.2
Posts: 184

Rep: Reputation: 30
Run httpd -t to check the httpd.conf file syntax. It should return the line number of any incorrect directive.
 
Old 10-19-2005, 08:20 PM   #7
mikeghet
Member
 
Registered: Aug 2004
Location: USofA
Distribution: fedora core < SUSE
Posts: 70

Original Poster
Rep: Reputation: 15
hey, THANK YOU for responding...this is drving me insanse!

I never knew there was a gui for editing apache...how nice, except it overwrites the entire httpd.conf file...everytime? The config file it generates looks retarded too, but no biggy.

Well, I tried it and saved it...then tried to restart the httpd service and it failed again. Went into the httpd config file and commented out the extra port added, restarted httpd, and of course it worked because it ONLY works on one port and that one port has to port 80!

I don't understand what I could have done to make two different installs not work.

On both of them i used up2date to update the kernel and one only one of them I also updated apache from *.54 - *.55 version...both give same errors, so it must be something else.

Doesn't apache run independenlty of other software? Meaning it doesn't rely on some other configuration to run does it?

Intrestingly enough, the ssconfig file is reporting name doesn't atch errors. too be continuted...
 
Old 10-19-2005, 08:50 PM   #8
mikeghet
Member
 
Registered: Aug 2004
Location: USofA
Distribution: fedora core < SUSE
Posts: 70

Original Poster
Rep: Reputation: 15
Ok, this is the most insane thing....


Just before I was ready to jump off the nearest bridge I decided to try the ever so lovely command:

apachectl restart

instead of

service httpd restart


Like I have always done.

Guess what!! It works with the different Listen directives now! Very very wierd huh? I guess it has to do with httpd not having permission to bind ports other than 80, or something...

Anyway, I've seen other peopl have this same problem on the internet, and like me five minutes ago, they had no solution, so maybe this will help ppl use ../https -start or service httpd restart same thing.
 
Old 10-19-2005, 09:20 PM   #9
paranoid times
Member
 
Registered: Jan 2005
Distribution: Fedora Core 3, 4
Posts: 135

Rep: Reputation: 16
thats interesting. i've always used

/etc/init.d/httpd start

because I forgot about service, I wonder if they work differently for some reason. anyways glad to know its working for you.
 
Old 10-28-2005, 12:03 PM   #10
ahildoer
LQ Newbie
 
Registered: Oct 2003
Location: Florida
Distribution: FC4 and Ubuntu and Knoppix
Posts: 8

Rep: Reputation: 0
Cool Solved - It is an SELinux issue.

Here is the solution to this one.

-Run system-config-securitylevel
-Click the 'SELinux' tab
-Under Modify SELinux Policy, expand 'HTTPD Service'
-Check 'Disable SELinux protection for httpd daemon'
-Click 'OK'
-If it prompts to save the changes, just select 'OK' or 'Continue' or 'Yes' or whatever the positive response is.

If you have any trouble with this, e-mail me: ahildoer@gmail.com
 
Old 10-28-2005, 12:45 PM   #11
mikeghet
Member
 
Registered: Aug 2004
Location: USofA
Distribution: fedora core < SUSE
Posts: 70

Original Poster
Rep: Reputation: 15
Oh, dang man, ur too good..! ;-)

I'm not at home on my linux box right now, but I know exactly what you are talking about.

Hopefully it works...I'll be sure to let ya know either way.

I was getting ready to convert my FC4 box to SUSE, as i've already done withmy desktop pc.
 
Old 11-08-2005, 05:08 PM   #12
whovian
LQ Newbie
 
Registered: Jul 2005
Location: Lock Haven, PA, USA
Distribution: Redhat 7.3, 9 and Fedora 3
Posts: 9

Rep: Reputation: 0
This worked great for me...thanks for the tip ahildoer The only one thing I can't figure out is how to grant access to a users public_html directory in FC3. If I could get this working it'd be great. I never had this problem with RH9.
 
Old 11-08-2005, 05:21 PM   #13
ahildoer
LQ Newbie
 
Registered: Oct 2003
Location: Florida
Distribution: FC4 and Ubuntu and Knoppix
Posts: 8

Rep: Reputation: 0
public_html folder issues

Tersely, as I am studying for 3 midterms at the moment, make sure your permissions are correct.

For my public_html folder I set the following permissions:
$ chmod 701 /home/ahildoer
$ chmod 701 /home/ahildoer/public_html

In order for the web server to be able to get to the contents of the public_html folder, the user’s home folder and the public_html folder must be executable. In the context of directories, execute allows the directories to be traversed. You may also want to set the permissions of the contents of the public_html folder as well. I do so with the following command:
cmod -R 755 /home/ahildoer/public_html/* # this will modify only the contents of the folder and all subfolders

One final thing to check:
$ vi /etc/httpd/conf/httpd.conf file # make sure you uncomment the public_html related entries
$ sudo /sbin/service httpd restart

If that does not get your public_html folder up and running, I do not know what will
 
Old 11-08-2005, 05:42 PM   #14
whovian
LQ Newbie
 
Registered: Jul 2005
Location: Lock Haven, PA, USA
Distribution: Redhat 7.3, 9 and Fedora 3
Posts: 9

Rep: Reputation: 0
the httpd.conf file was moved by one of the above changes. I have no idea where it's at now.
I'm pretty sure I uncommented those lines though and it still won't work with the chmod changes.
 
Old 11-08-2005, 05:48 PM   #15
ahildoer
LQ Newbie
 
Registered: Oct 2003
Location: Florida
Distribution: FC4 and Ubuntu and Knoppix
Posts: 8

Rep: Reputation: 0
you can try doing this to find the httpd.conf file:
$ sudo find / | grep 'httpd\.conf'

That could take some time.
Or if you plan to do lots of searches:
$ sudo updatedb # writes a file cache
$ locate httpd.conf # use this to seach the file cache for a file

Note: as files move around, the cache will go out of date. So do an updatedb before you start searching if it has been a while since the last time you ran updatedb.

But like I said before, if the conf file is configured correctly, and your permisions are set correctly, I do not know what it could be. I am actually not a Linux expert by any means.

Good luck.
 
  


Reply



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
accept() not opening new ports. blackhole123 Linux - Networking 2 12-01-2005 05:31 AM
Configuring SSH to listen on two different ports at once james penguin Linux - Software 4 11-24-2005 09:08 PM
Need Java program to listen on ports < 1024 w/o being root - possible brenan99 Linux - General 2 02-22-2005 02:12 PM
SSH listen on two ports Buto Slackware 1 10-02-2004 01:15 PM
a program to listen+accept incomming connection+echo packets ? qwijibow Linux - Software 0 03-01-2004 09:10 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:10 AM.

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
Open Source Consulting | Domain Registration