Link to home
Create AccountLog in
Avatar of thaburner
thaburnerFlag for United States of America

asked on

Apache works on 8080 but not 80

I'm using Fedora 8 and when I setup Apache from the GUI window it works under port 8080 but I cant seem to get it to work on 80. I have not done anything to it or created any virtual hosting, this is a fresh copy installed. I'm still new to Linux and I'm stumped, I tried to find out if i could search to see what program was running on 80 but no luck finding a command on the web.

[root@localhost /]# /sbin/service httpd restart
Stopping httpd:                                            [FAILED]
Starting httpd: (98)Address already in use: make_sock: could not bind to address [::]:80
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
                                                           [FAILED]
[root@localhost /]#
ASKER CERTIFIED SOLUTION
Avatar of ravenpl
ravenpl
Flag of Poland image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Avatar of thaburner

ASKER

i tried netstat -ltnp | grep :80 but it sits for a second then goes back to normal promt...
Do You run SElinux enabled?
selinuxenabled && echo YES

Is the apache custom build, or distro shipped?
yes i belive it is using SElinux, i remiber seeing it some where....

it was apache that came with the distro, i have not made any modifications to the configuration.
semanage port -l | grep http

does it shows port 80 for http_port_t ?

ls -l --scontext /usr/sbin/httpd

does it shows apache as httpd_t role?
this is what happen

[root@localhost /]# semanage port -l | grep http
bash: semanage: command not found
[root@localhost /]# ls -l --scontext /usr/sbin/httpd
system_u:object_r:httpd_exec_t:s0 /usr/sbin/httpd
[root@localhost /]#
Hmm, on second though, if it's selinux You should get "permission denied" instead of address already in use.
Please run "netstat -ltnp" again, and look for port 80 being used.
I don't see anything running on port 80, I attached the log....
netstat.txt
how do find out to make sure it is selinux?
> how do find out to make sure it is selinux?
Refer /var/log/messages

Indeed, nothing on port80...

How come there's no semanage? Install with
yum install policycoreutils
This is what i got....
Message.txt
My problem with apache and SSL was having the ssl include file at the top of the httpd.conf instead of AFTER all port-80 entries. seems yours is related to apache's inability to capture port 80.

Are all of your network devices setup and working?
Yes all my devices are setup and working properly, I'm currently using the MySQL service through out my network.
Avatar of Jan Bacher
Is there an existing pid file in /var/run that didn't get deleted?
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
I just reinstalled the whole OS and trying to set it back up, it keeps asking for the disk when I try to update all the OS updates and i have the disk in the drive it still asks for it. Any idea how I would get it to not ask for the disk? It never asked for the disc when I had the previous setup installed....
Oh, geez.  A port in use that couldn't be tracked down should have only required a reboot.

Can you cancel out of the request and continue on?
I just got the updater working, and will be getting the OS up to date and trying to setup again on port 80, will respond if it worked or not soon as I get it tested.
Thank you very much for your help, I finally got it working.