Вы находитесь на странице: 1из 3

4/15/2014 Apache Server on Windows 7 opening up ports?

- Super User
http://superuser.com/questions/92488/apache-server-on-windows-7-opening-up-ports 1/3
Take the 2-minute tour
user139604 WilliamKF
1,934 7 45 79
7 Answers
Snark
20.6k 3 45 68
I have installed Apache 2.2.14 on Windows 7 and can view my web pages using both
http://localhost and http://127.0.0.1 but when I try to access the server from another
computer on the same router, it fails. It also fails when I use the DynDNS address that I have mapped.
This worked fine under Windows XP before I upgraded to Windows 7.
I suspect the issue is something like port 80 not being opened up for outside access into the computer.
Does anyone know how to open that port up in the Windows Firewall, or if something else is locked down
what that is and how to unlock it?
windows-7 apache firewall port
edited Apr 16 '13 at 17:46 asked Jan 7 '10 at 4:15
To add a rule in the Windows Firewall for port 80, do the following:
Go to the Control Panel and launch "Windows Firewall"
Go to "Advanced Settings"
Select "Inbound Rules" in the left pane
Select "New Rule" in the right pane
In the New Inbound Rule Wizard, select "Port" as Rule Type, then click on "Next"
Select "TCP and put "80" (and any other ports you want to open) in "Specific local ports", then click
on "Next"
Select "Allow the connection", then click on "Next"
Select the network location where the rule should apply (select them all if you're not sure), then click
on "Next"
Give a name and an optional description
That should do it.
answered Jan 7 '10 at 4:35
1 You may find that there is already an "Apache" inbound rule under the firewall settings. If you examine this
rule, you will find some settings under the General tab, one of which is Action. There are two options - "Allow
the Connection" and "Allow the Connection if it is Secure". You could choose either of those options at your
discretion, but I suggest you read and understand the "Customize" options of the latter. Aaron Newton Oct
15 '11 at 6:53
It seems Windows 7 Firewall has a fear of the 80 port.
It will open those ports if you configure it this way:
Apache server UDP all ports.
Apache server TCP all ports.
That's bad since Apache usually works with specific ports (I mean 80, some use 8080, and 443), but I
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration
required.
Apache Server on Windows 7 opening up ports?
sign up

log in

tour

help

add comment
add comment
4/15/2014 Apache Server on Windows 7 opening up ports? - Super User
http://superuser.com/questions/92488/apache-server-on-windows-7-opening-up-ports 2/3
slhck
75.6k 14 154 206
Sergio Abreu
31 1
user23307
2,263 7 9
William Hilsum
87.3k 7 102 191
pcapademic
1,975 3 15 26
ricardo
11 1
WilliamKF
1,934 7 45 79
That's bad since Apache usually works with specific ports (I mean 80, some use 8080, and 443), but I
didn't find other way to get the Apache firewall rules to work.
edited Mar 9 '12 at 15:15 answered Mar 9 '12 at 12:36
sounds like you need to add an exception(port 80) to the windows firewall.
I'm sure this can be accomplished by opening the firewall control panel and clicking around a bit. In XP it
was fairly straightforward at least.
The problem could also be that apache is only configured to listen on the loopback interface. You can
test that by running netstat or by trying to visit the other address of your machine, like
http://192.168.1.101/
answered Jan 7 '10 at 4:20
Try both opening up the port on your router to your machine and looking at Windows own firewall.
Remember that when you reinstalled Windows, it is possible that you have a different DHCP lease and
have a different IP address so the router may not be forwarding it correctly any more.
On top of this, your router needs to support "Nat Loopback" otherwise you simply will fail to connect,
however I assume it supports it as you said it previously worked. To check for this, I highly advise you
use Hide My Ass or Proxify.
answered Jan 7 '10 at 4:31
> It is possible that you have a different IP address so the router may not be forwarding it correctly any more.
Agreed! I am portablizing my WordPress installation so I can easily host it from anywhere. I got it working
locally, but it is blocked from the world. There is already an exception in the Windows Firewall because I said
allow when it prompted me, so I checked the router, and sure enough, it was set to forward port 80 to the IP of
my desktop. Of course changing it to the laptop is no good. I ended up assigning a port-trigger instead, and
now works from any connected system. Synetech Nov 9 '12 at 17:13
In addition to checking the firewall and checking if apache is listening only to the localhost address, you
could/should also check your .htaccess files. The new version you installed may have implemented a
more restrictive security policy.
Some tutorials on .htaccess
Apache 1.3 - http://httpd.apache.org/docs/1.3/howto/htaccess.html
Apache 2.2 - http://httpd.apache.org/docs/2.2/howto/htaccess.html
A perhaps more friendly tutorial - http://wiki.uniformserver.com/index.php/HT
answered Jan 7 '10 at 4:53
I just mine working. I created the exception rule for port 80 on windows firewall. I'm running windows 7 on
the laptop and OSX Leopard on my Mac. The exception alone did not fix the problem. I then turned off
the Firewall and I was able to connect to the apache on the laptop from my mac. What really solved the
problem was in the control panel > network and sharing center. I changed the settings for the active
network and set it as the home network. If you check on the win firewall, you should see the Home
network(private) connected
answered Apr 12 '11 at 20:14
Looks like it is an issue with the Windows 7 firewall. When I turn off the firewall, it works properly. Now I
just need to figure out how to have the firewall active but allow port 80 connections.
answered Jan 7 '10 at 4:24
add comment
add comment
add comment
add comment
add comment
add comment
4/15/2014 Apache Server on Windows 7 opening up ports? - Super User
http://superuser.com/questions/92488/apache-server-on-windows-7-opening-up-ports 3/3
Not the answer you're looking for? Browse other questions tagged windows-7
apache firewall port or ask your own question.
add comment

Вам также может понравиться