5

I am a newbie with Apache. I am learning .. after the installation when I tried to start the service I got the following errors.

The Apache service named reported the following error:

Unable to open logs .

The Apache service named reported the following error:

no listening sockets available, shutting down .

The Apache service named reported the following error:

(OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0:80 .

The Apache service named reported the following error:

httpd.exe: Could not reliably determine the server's fully qualified domain name, using 192.168.1.6 for ServerName .

Mahm00d
  • 3,881
  • 8
  • 44
  • 83
Gainster
  • 5,481
  • 19
  • 61
  • 90
  • You can safely ignore the last error, it's very common and doesn't affect the usage of the server. If you really hate seeing it, add a line to `apache2.conf` with `ServerName 192.168.1.6`. – Delan Azabani Aug 14 '10 at 08:39
  • @Delan: Are you saying it's because Apache doesn't know what interface to bind to so chooses "0.0.0.0"? I don't think so. I think the problem is that OP already has a server listening on port 80, maybe an IM client (Skype listens on port 80 and 443 if they're free when it starts) – Adrian Pronk Aug 14 '10 at 08:48
  • but I am unable to start the service how i can i ignore the errors – Gainster Aug 14 '10 at 08:49
  • ok after closing skype i was able to run the service – Gainster Aug 14 '10 at 08:52
  • If it is solved now, @Adrian why don't you add your comment as an answer so @Huzaifa can mark it as accepted. – Pekka Aug 14 '10 at 08:53
  • @Pekka: I was composing it while all the above comments were made :-) Once Apache is running, you can restart Skype again with no problems. – Adrian Pronk Aug 14 '10 at 09:00
  • Adrian, that is *not* what I'm saying. Apache still binds correctly with that nonsensical "error". You don't need to set a ServerName. I did so that it won't show that "error". – Delan Azabani Aug 14 '10 at 09:18
  • @Delan: Sorry, my mistake. I thought you were referring to the previous error in grey. I didn't at first see the last error. – Adrian Pronk Aug 14 '10 at 09:31
  • possible duplicate of [Windows could not start the Apache2 on Local Computer - problem](http://stackoverflow.com/questions/195641/windows-could-not-start-the-apache2-on-local-computer-problem) – Helen May 06 '13 at 13:48

9 Answers9

12

The following error usually means that some other program is listening on the HTTP port (80).

(OS 10048)Only one usage of each socket address (protocol/network address/port) is normally permitted. : make_sock: could not bind to address 0.0.0.0:80 .

In my experience, IM (chat) clients like to connect to port 80.

From a command prompt, (cmd.exe) run the command:

netstat -an

See if there is a listener on port 80 (Look for a line that says:

   TCP    0.0.0.0:80           0.0.0.0:0              LISTENING
   ===           ====

the important thing being TCP and 80. If you find something, you'll need to track it down using something like TcpView

Adrian Pronk
  • 13,486
  • 7
  • 36
  • 60
  • This is a great utility! Thank you very much. – NobleUplift Jan 05 '14 at 22:36
  • I'll just add as a comment (since this is a fringe case) that if you have an application that uses one port for SSL and one for regular HTTP, an error like this could be spawned by a misconfiguration where the SSL and HTTP port are the same. This way, the application is blocking its own port. So if you're having this issue but it's not another app blocking it, consider a configuration error. – pzkpfw Oct 20 '16 at 04:33
5

If Skype is your problem and it seems it usually is, alter Skype's port usage.

Click on Tools in Skype, click on Options, click Advanced, click Connections. In Connection is the option to use another port, I use a high numbered port such as 65432, then un-click the alternative use of port 80 and 443. Close and restart Skype.

nativetrader
  • 51
  • 1
  • 3
3

modifying C:\Program Files\Apache Software Foundation\Apache2.2\conf\httpd sloved the problem.

If you had installation problems, note that you might experience some errors such “ no services installed ” if Apache is trying to share port 80 with another web server or application, such as a locally installed firewall application. To fix this, you can tell Apache to use a different port. Open your httpd.conf file in the conf subdirectory ( C:\Program Files\Apache Software Foundation\Apache2.2\conf by default) and locate the following lines:

# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of 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 12.34.56.78:80
Listen 80
Change the last line of this block to read:
Listen 8080
Pekka
  • 442,112
  • 142
  • 972
  • 1,088
Gainster
  • 5,481
  • 19
  • 61
  • 90
3

skype uses port 80, try logout and shut down the program... now run apache

luchopintado
  • 899
  • 11
  • 15
2

if you are using windows os and believe that skype is not the suspect, then you might want to check the task manager and check the "Show processes from all users" and make sure that there is NO entry for httpd.exe. Otherwise, end its process. That solves my problem.

Aldee
  • 4,439
  • 10
  • 48
  • 71
1

Changing in the config file every occurrence of the path to apache (eg: "C:/Users/xxxx/Desktop/Apache Software Foundation/") to the new location (in case you shifted directory of apache installation by copy paste) solved my problem. Hope it helps you too..

raghu
  • 31
  • 2
1

Please note that, not only http port 80, may your ssl port 443 is being used by any other service or software. I have installed vmware workstation on my PC, so a process which was initiated by Vmware Workstation was using ssl port 443. In my case, it was vmware-hostd.exe which was utilizing ssl port 443.

Try shutting down vmware-hostd.exe or simply change your ssl-httpd.conf and modify Listen from 443 to 8080 or something else. While choosing the port number please be sure that you don't enter any port which can be used by any other software on your PC.

1

just provide the listen address and port in httpd.conf file. that will not show IP related error as

Listen IP_ADDRESS:PORT

If you change port ( not port 80) then port conflict will not occur and server comes up.

Below blog may help you :-

http://apache2-4-9-webserver-installation.blogspot.com/2014/06/how-to-install-apache-http-server.html

bj4you
  • 99
  • 1
  • 4
1

Port 80 conflict. There are a number of well-known Windows programs which use

port 80:

IIS

The most likely culprit is Microsoft Internet Information Server. Stop the

service with the command from the command line on Windows 7/Vista:

net stop was /y

If needed start the services again with the command from the command line on

windows /Vista:

net start was /y

Test
  • 11
  • 1