why won't Apache accept and additional Listen ports?
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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....
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
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...
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.
-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.
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.
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
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.