• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

need help setting up apache on fedora core

fishjie

Senior member
Hello, I originally posted this in the computer help forum but got no responses. Perhaps this is a better forum to post in. I've been meaning to learn linux, and aside from using it a couple of times when I was in school, I've mostly used windows. I got fedora core installed on my computer (not sure how to determine what version), and am trying to get apache working.

Right now localhost and 127.0.0.1 does not resolve. I created an index.html in the /var/www/html/ directory.

So first I checked httpd.conf:
/sbin/service httpd configtest
Syntax OK

Then I checked the service:
/sbin/service httpd status
httpd is stopped

So then I tried /etc/init.d/httpd start. I get the error:

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

So
1. How do I determine what processes are using port 80?
2. How do I troubleshoot logs not working? Where are logs written to?

Any help would be greatly appreciated. Thanks!
 
1. How do I determine what processes are using port 80?

netstat -antp
lsof -n

2. How do I troubleshoot logs not working? Where are logs written to?

I've never had a problem with logging in Apache, find the log path in the config file and verify that the Apache user can write there.
 
Originally posted by: Brazen
If this web server is going to be for anything important, you might just want to switch to CentOS. See this thread for an example of why: http://forums.anandtech.com/me...id=82&threadid=2172524

no this is definitely just for fun. between work and other hobbies, i don't spend too much time learning linux, as evidenced by my late replies to this thread.

Originally posted by: Nothinman
1. How do I determine what processes are using port 80?

netstat -antp
lsof -n

2. How do I troubleshoot logs not working? Where are logs written to?

I've never had a problem with logging in Apache, find the log path in the config file and verify that the Apache user can write there.

Here is what netstat -antp returns. lsof-n gives me a command not found error

Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:49928 0.0.0.0:* LISTEN -
tcp 0 0 0.0.0.0:111 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN -
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN -
tcp 0 0 192.168.113.102:44856 8.14.216.42:80 ESTABLISHED 21909/firefox-bin
tcp 0 0 192.168.113.102:44099 8.14.216.8:80 ESTABLISHED 21909/firefox-bin
tcp 0 0 192.168.113.102:44322 208.65.201.106:80 ESTABLISHED 21909/firefox-bin
tcp 0 0 192.168.113.102:44320 208.65.201.106:80 ESTABLISHED 21909/firefox-bin
tcp 0 0 192.168.113.102:39569 8.14.216.81:80 ESTABLISHED 21909/firefox-bin
tcp 0 0 192.168.113.102:54863 8.14.216.75:80 ESTABLISHED 21909/firefox-bin
tcp 0 0 192.168.113.102:53423 8.14.216.80:80 ESTABLISHED 21909/firefox-bin
tcp 0 0 192.168.113.102:36021 209.85.133.91:80 ESTABLISHED 21909/firefox-bin
tcp 0 0 192.168.113.102:46584 204.2.215.26:80 ESTABLISHED 21909/firefox-bin
tcp 0 0 :::22 :::* LISTEN -

so any idea why i would get the error: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down

Originally posted by: Netopia
What happens if you go to http://(machine's IP address)?

Joe

ok stupid question on my part, how do i find out the ip address on fedora core? and how do i find out what version of fedora core i'm running? i'm guessing my ip address of the machine would be 192.168.113.102 based on the netstat output above, but what is the linux equivalent of the windows ipconfig command? either way, when i type that ip into the browser it gives me an unable to connect error.

kamper: yes im doing everything as root
 
so any idea why i would get the error: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down

I don't see anything listening on 80 so you've probably got Apache trying to listen on 80 twice.
 
Originally posted by: fishjie


ok stupid question on my part, how do i find out the ip address on fedora core? and how do i find out what version of fedora core i'm running? i'm guessing my ip address of the machine would be 192.168.113.102 based on the netstat output above, but what is the linux equivalent of the windows ipconfig command? either way, when i type that ip into the browser it gives me an unable to connect error.

kamper: yes im doing everything as root

ifconfig

but if fedora is setup like centos, then its not part of your default path
its under /sbin with a number of other things, so until you add /sbin to your path, you'll go:

/sbin/ifconfig

and it will return what youre looking for
this is a quick explanation on adding directories to your path.
 
Originally posted by: Nothinman
so any idea why i would get the error: (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down

I don't see anything listening on 80 so you've probably got Apache trying to listen on 80 twice.

what part of httpd.conf do i need to check to see if this is the problem?
 
never mind i figured it out. i was using the http server configuration tool (its a gui), and in the available addresses box i had originally had it listen on port 80.

By simply deleting that entry from the box, I was able to start httpd, and get localhost up and running. It was a little confusing, because with the box empty I thought that apache wouldn't be listening on any ports at all. So I guess you were right, apache was listening on port 80 twice. I guess I'll never use a gui again and stick with config files from now on.

well thanks for all your help and patience!
 
Back
Top