Apache Error
Hello!
I'm fairly new to Apache and to Linux. I'm trying to configure Apache to host a website. I've set up the information as best I can, but I get an error every time I try to start the httpd service. Maybe someone can define my error. Here is the error: Starting HTTPD: (99)Cannot assign requested address: make_sock could not bind to address 172.16.1.3:80 No listening sockets available, shutting down Any help is greatly appreciated as this is for a school project. Nick |
Something's got that socket bound up already, to find out what it is run: "netstat -nap --inet|grep -w 80|grep -i listen" (is it possible that apache's already running when you're trying to start it?)
|
I don't believe it is already running, the service has been turned off.
Just to clarify, does socket mean port? Here is what I see: 4240/rpc.statd 0.0.0.0:32768 4359/xinetd 127.0.0.1:32769 4221/portmap 0.0.0.0:111 4549/X 0.0.0.0:6000 4344/sshd 0.0.0.0:22 4401/cupsd 127.0.0.1:631 Hope this helps since I can't copy paste. lol Nick |
your ISP might have blocked port 80?
|
We're building our own network, so we're not connected to the school network.
|
Quote:
Try this one "lsof -i :80" in the first column of the output will be the process that's listening on port 80, kill it :) Something's already listening on port 80, or you have apache configured to listen on a non-existant interface, I'm assuming "172.16.1.3" is the ip you're trying to get it to listen on from your first post. if thats not correct you'll need to fix it in your httpd.conf. |
Tried the new command, and got nothing. :confused:
You're right, I'm trying to congure it so that when someone types in my IP address 172.16.1.3 in their address bar they bring up my webpage. Would it help if I copy pasted my HTTPD.conf file here? Nick |
What, if anything is set as "bindaddress" in httpd.conf? also, are you certain that the ip address you gave is correct? Check the output of ifconfig eth0 (assuming you've only got one NIC and are trying to bind to it)
(if you're getting an IP from DHCP, change over to a static addy as well) Edit ...also, just for S&G, run "apachectl configtest" to check your config files for accuracy.... |
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, in addition to the default. See also the <VirtualHost> # directive. # # Change this to Listen on specific IP addresses as shown below to # prevent Apache from glomming onto all bound IP addresses (0.0.0.0) # Listen 172.16.1.3:80 #Listen *:80 I've already configured my IP address to be static. I'm the DHCP server on our project. Nick EDIT: The resut of that command was that the syntax was OK. |
one other, probably stupid, question ....you are attempting to start apache as root aren't you?
Also, what distro are you using and do you know if you have SELinux enabled? watch the output of /var/log/messages when you attempt to start and see if anything's popping up in there that would be relavent... |
Indeedy, logged in as root.
This is RedHat 9 2.4.20-6 Would it matter if I wrote to the httpd.conf file using the GUI HTTPD tool and now am trying to edit it without that tool? Thanks for trying to help, I really appreciate it. Nick EDIT: It only says that HTTPD service failed. Oh by thje way, I've changed a few things since we began, and I am no longer seeing the error on the first post. All it says now is that the service failed withy no error message. Maybe that will spark something. |
Just to check, uncomment "Listen *:80" and comment out "Listen 172.16.1.3:80" and try to start .....
|
Something else:
Within the /var/log directory there is another directory called httpd. I went into it and into a file named error_log. THis log says "Name or service not known: mod_unique_id: unable to find IPv4 address of "HQDHCP" Configuration failed! HQDHCP is my host name, just so you know., |
Quote:
|
There's gotta be a simple explanation...it's just hard as heck going back and forth via a message board. Are you trying to run any vhosts by chance?
Also, if you can, go ahead and post your httpd.conf ...there's gotta be something amiss in there that apache's not seeing as an error, but is preventing it from starting. |
All times are GMT -5. The time now is 05:12 PM. |