4

I have searched on Google and here as well, I'm trying to put my apache2 server running on my Windows 7 machine online for public access.

I have a bell 2wire modem/router and am behind a NAT, I have forwarded port80 to my computer.

I cannot however access the server from local ip or my public ip address. The only computer that can currently access the webserver is the computer it is running on, via 127.0.0.1

I also am 99% sure there are no conflicts on that port. However i'm not positive how to verify that.

I know I have to be missing something here, I can't imagine this is that hard to do.

Please excuse the lack of information, I'm not by any means a professional IT person. I have a group of clients overseas and I'm trying to demo some code, so this does not need to be a secure or permanent solution. Once my application is ready to go live I will invest the time setting up a proper stand-alone server (or more likely hire someone to do it for us).

8
  • What does the "Listen" line(s) in httpd.conf look like?
    – Chris S
    Sep 27, 2011 at 15:25
  • 1
    Make sure that Apache is not listening on only loopback interface. Post your configuration file.
    – quanta
    Sep 27, 2011 at 15:25
  • Listen 127.0.0.1:80..
    – rlemon
    Sep 27, 2011 at 15:41
  • 1
    Hey, @DownVoter (wish that worked), If you don't like the quality of my question maybe offer a suggestion to better it? I gave all information I had. Searched the site for a similar question and couldn't find anything that would assist me. I also mentioned at the bottom that I know very little about this process... so what else can I do but ask.
    – rlemon
    Sep 27, 2011 at 15:51
  • 2
    @gregd - I've seen plenty of small businesses using Windows 7 as a server. And rlemon is talking about using it in a professional way with professional software. I think it belongs here, personally.
    – Rob Moir
    Sep 27, 2011 at 16:23

4 Answers 4

5

Listen 127.0.0.1:80

It means that you bind the Apache to only loopback interface. Change to Listen 80 to make it listen on all available interfaces. Don't forget to restart Apache.

2
  • Cool, thanks! This is the kind of information I would have thought would be easier to find.. google "make Apache2 on Windows 7 Public Access" and you get nothing useful.
    – rlemon
    Sep 27, 2011 at 15:54
  • 3
    That's because no sysadmin would ever google that.
    – MikeyB
    Sep 27, 2011 at 16:12
3

Have you checked that Apache's configured to listen to all IP interfaces, not just localhost? If you do a netstat you should have an apache or httpd process listening to 80 on 0.0.0.0.

Sounds like Apache is set to just listen to the loopback/localhost address, so only that machine itself can connect to it. Find the config file, change the interfaces it listens to, and then other machines should be able to pull up the web server.

4
  • Sounds simple enough.. Got any guides for how to do that? I'm flying blind here.
    – rlemon
    Sep 27, 2011 at 15:49
  • I'm not sure off the top of my head where your httpd.conf file is on Windows. You might find it in an install dir for the binary. Sep 27, 2011 at 16:01
  • Alternatively you could try running procmon (google sysinternals) (free too) and re-start the apache process and see what conf files are hit in the startup process. That should give you a path. Sep 27, 2011 at 16:01
  • nahh, not what i meant. I need to know what to change the listen to.. got my answer. Thanks for the help!
    – rlemon
    Sep 27, 2011 at 16:03
1

To rule out a possible port conflict on 80, you can use:

netstat -noab | find /i ":80" | find /i "LISTEN"
1
  • awesome thanks, this is all good information for the 'new guy'
    – rlemon
    Sep 27, 2011 at 16:04
0

Have you opened port 80 on your Windows firewall? My guess is not. It's not a port conflict or you wouldn't be able to get to the web server using the loopback address.

You can check if this is a connectivity by trying to telnet to your machine on port 80 and issuing a GET and seeing what happens.

1
  • 1
    I have disabled windows firewall. useless anyways.
    – rlemon
    Sep 27, 2011 at 15:39

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .