12

I have a Windows 7 machine serving a very few (but important!) pages. I have an exception that allows any traffic to port 80*, but Apache 2.2 still can't serve pages (though I can see them from the machine itself). If I disable the Windows Firewall entirely, though, I can ping the box and load pages.

What else do I need to configure so that Apache can do its job?

* Actually, the same thing happens even if I change the exception to "all ports" rather than just 80.

2
  • 3
    1. Stop using ping as a service testing tool. Whether you can ping the host or not is irrelevant to whether or not the web site is running and accessible. 2. Which network profile is active in Windows firewall and which network profile is your rule bound to?
    – joeqwerty
    Sep 28, 2011 at 19:18
  • @joeqwerty: I mention ping only to provide additional information.
    – Charles
    Sep 29, 2011 at 1:50

6 Answers 6

12

Whether or not port 80 is open on your firewall, doesn't mean that ping will start working if Apache is running correctly. Ping uses ICMP which is a protocol of it's own that needs to be opened on the firewall in order to receive ping replies from your machine. So don't count on ping to verify if your apache configuration/firewall configuration is working.

In response to your firewall rule for tcp 80, please go to your rule's properties and check if all 3 checkboxes (Domain, Private, Public) are checked, and if not check them. enter image description here

Here's a HOWTO with the exact steps you need to take in order to open port 80 on Windows 7: link

Update:

Please also check if you're not blocking the apache process itself with Windows Firewall.
1. Go to Control Panel
2. Select System and Security
3. In the Windows Firewall section, select Allow a program through Windows Firewall.
enter image description here
4. Unchecking the box to the left of the application name disallows it from accessing network resources, while checking it allows access.
enter image description here
If Apache is not listed, you can click the Allow another program… button to add it and then check the boxes under Home/Work and Public.

6
  • All three arechecked. The website will not open in a browser (except on the server itself).
    – Charles
    Sep 29, 2011 at 1:48
  • 1
    @Charles: In that case do these 5 things: 1. Enable firewall logging on the Windows 7 machine. 2. Install a packet capture program on the Windows 7 machine. 3. Start a capture. 4. Try to browse the web site from another machine. 5. Stop the capture and inspect it and the firewall log for clues as to what's happening.
    – joeqwerty
    Sep 29, 2011 at 4:22
  • Are you sure you have created the rule in Inbound Rules in the left pane? Sep 29, 2011 at 9:17
  • @Charles please check my update. Sep 29, 2011 at 9:29
  • 1
    @George: That's it. Allowing "Monitor Apache Servers" (in addition to the port 80 exception) made it work.
    – Charles
    Sep 29, 2011 at 13:28
2

If disabling the firewall entirely addresses the issue, but your exception rules do not, then I would venture to say that your exceptions are faulty.

According to Microsoft, the first step in troubleshooting firewall issues is to verify the active profile (Public, Private or Domain).

The first step in troubleshooting Windows Firewall problems is to verify which profile is active. The Windows Firewall with Advanced Security is a network location aware application. As the network locations that the computer is connected to change, the Windows Firewall profile changes. The profiles describe the Windows Firewall settings and rules that are applied depending on the network location type of active network connections.

So one possiblity is that you made the right rule but in the wrong profile.

Hope that helps.

1
  • Good thought, +1. This isn't end up being my problem but I could see someone making this mistake.
    – Charles
    Sep 29, 2011 at 13:32
2

Check service "Branch cache" and stop it if running.

1

Your firewall does not allow any new connection to share information without your consent. ONLY thing to do is give your consent to your firewall.

  1. Go to Firewall settings in Control Panel
  2. Click on Advanced Settings
  3. Click on Inbound Rules and Add a new rule.
  4. Choose 'Type Of Rule' to Port.
  5. Allow this for All Programs.
  6. Allow this rule to be applied on all Profiles i.e. Domain, Private, Public.
  7. Give this rule any name.

That's it. Now another PC and mobiles connected on the same network can access the local sites. Lets Start Development.

1

To add to all of the answers above what i had to do extra is go to control panel, firewall, advanced settings on the left, and in inbound traffic i right clicked every rule that's named apache and activated it aswell as right clicking it, clicking on its properties and there click the Advanced tab and make sure you check "Private" "Public" and "Domain" for every rule that u find in the inbound list don't forget

0

Your httpd.conf is probably restricting to clients on localhost or local subnet only.

In your httpd.conf set:

<Directory />
    Options FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>

and possibly also this one:

<Directory "E:/Apache/htdocs">
    Options Indexes FollowSymLinks
    AllowOverride None
    Allow from all
</Directory>
1
  • Not the problem, because if I turn off the firewall the problem goes away. (Also, before upgrading to Win7, the same httpd.conf worked fine for years.)
    – Charles
    Sep 29, 2011 at 1:50

You must log in to answer this question.

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