LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Cannot start Apache Webserver 2... (https://www.linuxquestions.org/questions/linux-networking-3/cannot-start-apache-webserver-2-a-474669/)

myfokkinnick@yahoo.i 08-17-2006 03:28 AM

Cannot start Apache Webserver 2...
 
Hi there

I've been following the mailserver tutorial on HowToForge, http://www.howtoforge.com/perfect_setup_ubuntu_6.06_p6

When I try to start the Apache Webserver, I get the following:

root@ubuntu:/home/user/Desktop/install_ispconfig# /etc/init.d/apache2 restart
* Forcing reload of apache 2.0 web server... (98)Address already in use: make_sock: could not bind to address [::]:80
no listening sockets available, shutting down
Unable to open logs

Can anyone help me with this?

Regards

bulliver 08-17-2006 04:30 AM

Quote:

Address already in use: make_sock: could not bind to address [::]:80
The error suggests that something is already running on port 80. Can you confirm or deny this?

myfokkinnick@yahoo.i 08-17-2006 05:21 AM

Im still a noob.

How can i check if something is using that port?

helptonewbie 08-17-2006 05:39 AM

you could use a port scanner such as "nmap" which can be already installed on your distro but not totally sure as i dont use your distro type. if it has you can type this into the console and it would tell your what ports are listening and the service running on that port. eg

nmap -sT -O localhost

if that doesn't work then try a netstat, this specific command would give you specific info on port 80 as requested.

netstat -anp | grep 80

hope it helps

myfokkinnick@yahoo.i 08-17-2006 06:08 AM

Ok, I tried: nmap -v -P0 -p 80 localhost

It said that port 80 is closed. So, how do I open it, I guess that is the problem.

mkirc 08-17-2006 07:29 AM

Hello,
if nmap says the port is closed, it means that nothing is running (listening) there.

Try the following: Change the listening port in the Apache Config (httpd.conf) to another port (i.e 8088) and try to restart it.
If this works, you have a conflict on port 80.
If this doesnt help, its something else.

Hope that helps,
regards, michael

helptonewbie 08-17-2006 07:51 AM

yep he/she is totally rite :D took the words outta my mouth

myfokkinnick@yahoo.i 08-18-2006 02:37 AM

Thanks for the help. I did what you suggested and the server started.

You say there could be a conflict on port 80, how can I resolve this?

bulliver 08-18-2006 03:06 AM

Quote:

You say there could be a conflict on port 80, how can I resolve this?
Try:
netstat -anp | grep 80

as helptonewbie suggested. Should tell you the pid number and process name of whatever is running on port 80.

mkirc 08-19-2006 08:31 AM

Good that it worked out !
But I assume you want your webserver sunning on port 80 ?

Try the following:
nmap –A –T4 –F localhost

This should tell you which program runs on which port.

Nmap is great, but can only make a qualified guess which program runs behind a port, but very often its right !!


All times are GMT -5. The time now is 01:02 PM.