Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Apache won't start


  • Please log in to reply
12 replies to this topic

#1 timjh

timjh

  • Members
  • 30 posts
  • OFFLINE
  •  
  • Local time:07:08 AM

Posted 05 September 2009 - 03:21 PM

Hello,

I recently downloaded and installed the XAMPP 1.7.2 code onto my Windows XP machine. While the installation seemed to go fine, I am unable to start either Apache or MySql from either the XAMPP Control Panel or the command line. I checked the Apache error log, and got this:

(OS 10013)An attempt was made to access a socket in a way forbidden by its access permissions. : make_sock: unable to listen for connections on address 0.0.0.0:80 no listening sockets available, shutting down

I had read about conflicts between McAfee and Apache, so I went so far as to uninstall McAfee, and now MySql starts and runs. However, Apache is still a problem.

I am not running Skype or IIS. I ran xampp-portcheck.exe, and all ports show up as free. I've disabled all firewalls, to no avail.

Can anyone shed any light on this?

Thanks,

timjh

BC AdBot (Login to Remove)

 


#2 Romeo29

Romeo29

    Learning To Bleep


  • BC Advisor
  • 3,194 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:127.0.0.1
  • Local time:10:08 AM

Posted 06 September 2009 - 10:16 PM

1. Open httpd.conf in Windows Notepad
2. Search for a string Listen. You would find something like Listen 0.0.0.0:80 or Listen 80
3. Change it to Listen 127.0.0.1:80 and save the file.
4. Start Apache.

If this does not work, change the line to Listen 8080 or Listen 127.0.0.1:8080, save the file and restart Apache. If Apache starts now then problem is that port 80 is already open by some other application. That application may be some web traffic scanner which some antivirus products install these days. In this case you can test Apache by specifying port number like http://localhost:8080

#3 timjh

timjh
  • Topic Starter

  • Members
  • 30 posts
  • OFFLINE
  •  
  • Local time:07:08 AM

Posted 10 September 2009 - 01:33 AM

This is really getting me down. I found out that my ISP blocks port 80, so I forwarded port 80 to an available, open port, confirmed that the new port is in fact open using a port checker tool, modified the httpd.conf file to point to the open port, and I STILL can't get Apache to start.

#4 timjh

timjh
  • Topic Starter

  • Members
  • 30 posts
  • OFFLINE
  •  
  • Local time:07:08 AM

Posted 10 September 2009 - 01:48 AM

I stand corrected. I re-checked using the port checking tool, and the new port is not open. I'm assuming the firewall is implicated in this case. I'm using the Windows Firewall, and as far as I can tell, I've added Apache to the list of Exceptions. This is just nuts.

#5 Romeo29

Romeo29

    Learning To Bleep


  • BC Advisor
  • 3,194 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:127.0.0.1
  • Local time:10:08 AM

Posted 10 September 2009 - 08:00 AM

This is really getting me down. I found out that my ISP blocks port 80, so I forwarded port 80 to an available, open port, confirmed that the new port is in fact open using a port checker tool, modified the httpd.conf file to point to the open port, and I STILL can't get Apache to start.


No you are doing it wrong.

Apache listens incoming connections at port 80 (called HTTP port) of your computer by default (you can change the port in httpd.conf)
Routers that is provided by your ISP, block any incoming connection at port 80.


So in your router forward port 80 and Apache would start to work. There is no new port to be mixed with.
In your router you should find Apache in servers list, if not then create a new rule and apply it.

You can lookup this web site for instructions on how to do so for your router : http://portforward.com/

#6 timjh

timjh
  • Topic Starter

  • Members
  • 30 posts
  • OFFLINE
  •  
  • Local time:07:08 AM

Posted 10 September 2009 - 01:48 PM

Let me make sure I understand what you're saying -- which, I believe, is that I should not be forwarding port 80 to another port number (I used 8888 in this case), but instead I should forward port 80 to port 80. Is that correct?

I have been using the info at http://portforward.com/ to do the forwarding.

I do appreciate your help, thanks.

#7 Romeo29

Romeo29

    Learning To Bleep


  • BC Advisor
  • 3,194 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:127.0.0.1
  • Local time:10:08 AM

Posted 10 September 2009 - 09:51 PM

All you have to do is forward port 80 in your router, which would open port 80 to outside access.

If you are talking about internal and externals port settings, then you should make them both 80. Apache is using internal port 80 and a website user from outside will connect to port 80 of your system through your router.

Can you please give the model of router you are using.

More information : http://en.wikipedia.org/wiki/Port_forwarding

Edited by Romeo29, 10 September 2009 - 09:54 PM.


#8 timjh

timjh
  • Topic Starter

  • Members
  • 30 posts
  • OFFLINE
  •  
  • Local time:07:08 AM

Posted 11 September 2009 - 09:09 PM

I'm using the Linksys BEFSR41-v3. Here's how I have it set up currently:


Port Range

Application Start End Protocol IP Address Enabled

Apache 80 to 80 Both 192.168.1.x Yes

#9 Romeo29

Romeo29

    Learning To Bleep


  • BC Advisor
  • 3,194 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:127.0.0.1
  • Local time:10:08 AM

Posted 12 September 2009 - 05:57 AM

http://portforward.com/english/routers/por...4-v5/Apache.htm

Apache 80 80 Both 192.168.1.x Yes

Did you change x to your internal IP address's last octer like if it is 192.168.1.2, then make x=2?
Then Save settings. I cannot see it in portforward but there can be some Apply Settings as well.

To find internal ip address do a Start Menu > Run, type cmd press Enter and in command prompt type ipconfig and press Enter.

#10 timjh

timjh
  • Topic Starter

  • Members
  • 30 posts
  • OFFLINE
  •  
  • Local time:07:08 AM

Posted 14 September 2009 - 09:55 PM

Yes, I've got the ip address set correctly, and Apache still won't start. I'm beginning to wonder if the problem isn't with my firewall. They allude to this on the Port Forward website here in the section titled About How Bad Software Firewalls Are:

http://www.portforward.com/help/portcheck_help.htm

#11 Romeo29

Romeo29

    Learning To Bleep


  • BC Advisor
  • 3,194 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:127.0.0.1
  • Local time:10:08 AM

Posted 15 September 2009 - 04:43 AM

Three steps are needed for Apache to work.

1. Run Apache server and check if you can visit http://127.0.0.1/ in your browser. Do not change port 80 to anything else in httpd.conf

2. Check if rules for Apache in your software firewall are set properly. It should be set as a server, accepting incoming connections on port 80.

3. Check if port 80 of your system is forwarded (i.e. it is open to outside world).

You seem to do everything right !

One way to see if your system is accepting incoming connections on port 80 is using http://dnstools.com
Find your external IP address using http://www.whatsmyipaddress.com/ then paste it in dnstools.com and check Do it all and click Go.

#12 Romeo29

Romeo29

    Learning To Bleep


  • BC Advisor
  • 3,194 posts
  • OFFLINE
  •  
  • Gender:Not Telling
  • Location:127.0.0.1
  • Local time:10:08 AM

Posted 15 September 2009 - 05:10 AM

Three steps are needed for Apache to work.

1. Run Apache server and check if you can visit http://127.0.0.1/ in your browser. Do not change port 80 to anything else in httpd.conf

2. Check if rules for Apache in your software firewall are set properly. It should be set as a server, accepting incoming connections on port 80.

3. Check if port 80 of your system is forwarded (i.e. it is open to outside world).

You seem to do everything right !

One way to see if your system is accepting incoming connections on port 80 is using http://dnstools.com
Find your external IP address using http://www.whatsmyipaddress.com/ then paste it in dnstools.com and check Do it all and click Go.

EDIT:

Yes, I've got the ip address set correctly, and Apache still won't start.

If apache is not running, port forwarding is meaningless.
Start command prompt Start Menu > Run, type cmd and press enter. Then do cd to Apache folder and then type httpd.exe. If Apache cannot start because of some problem, it shows error. Post that error here.

Are you also running MS IIS server or some kind of web proxy or web shield software? Download TCP View from http://technet.microsoft.com/en-us/sysinte...s/bb897437.aspx
Run TCP View and find if any other program is Listening on port 80? If some other program has already opened port 80 and listening, then Apache would not start and give error that opening socket failed.

TCP View would show a program listening on port 80 as show below :
Posted Image
Actually port 80 is also called http port. Here I am running nginx server on port 80(http).

Edited by Romeo29, 15 September 2009 - 05:13 AM.


#13 timjh

timjh
  • Topic Starter

  • Members
  • 30 posts
  • OFFLINE
  •  
  • Local time:07:08 AM

Posted 19 September 2009 - 02:54 AM

Here's the error from the error log:

Can't open nul: No such file or directory
perl_parse: No such file or directory


I downloaded an ran TCP View, and I don't see any programs listening on port 80.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users