从防火墙外部访问 Apache 2.2 服务器时出现问题

从防火墙外部访问 Apache 2.2 服务器时出现问题

我已经做了一切本教程告诉我设置一个 Apache 2.2 HTTP 服务器,然后将端口 80 转发到服务器所在的机器。

但是,当我尝试通过完全更新的 Netgear 路由器连接到服务器时,我没有收到任何响应。当我仅输入服务器计算机的本地 IP 地址时,一切正常,但当我尝试连接到外部 IP 地址(应重定向到有效的本地 IP 地址)时,却没有收到任何响应。

我不确定这是我的 ISP、Apache 服务器设置还是防火墙的问题。

我如何找到并修复此问题?


日志:

从防火墙内部成功连接后,我在“error.txt”文件中收到此日志:

[Sat Feb 25 03:09:23 2012] [error] [client 192.168.1.7] client denied by server configuration: C:/Users/Griffin/.htaccess
[Sat Feb 25 03:09:23 2012] [error] [client 192.168.1.7] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Feb 25 03:09:23 2012] [error] [client 192.168.1.7] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Feb 25 03:09:23 2012] [error] [client 192.168.1.7] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Feb 25 03:09:23 2012] [error] [client 192.168.1.7] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Feb 25 03:09:23 2012] [error] [client 192.168.1.7] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Feb 25 03:09:23 2012] [error] [client 192.168.1.7] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Feb 25 03:09:23 2012] [error] [client 192.168.1.7] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Feb 25 03:09:23 2012] [error] [client 192.168.1.7] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Feb 25 03:09:23 2012] [error] [client 192.168.1.7] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Feb 25 03:09:23 2012] [error] [client 192.168.1.7] (OS 5)Access is denied.  : Cannot map GET / HTTP/1.1 to file
[Sat Feb 25 03:09:23 2012] [error] [client 192.168.1.7] File does not exist: C:/Users/Griffin/favicon.ico

“access.txt”文件中的内容如下:

192.168.1.7 - Griffin [25/Feb/2012:03:09:23 -0800] "GET / HTTP/1.1" 200 1707
192.168.1.7 - Griffin [25/Feb/2012:03:09:23 -0800] "GET /favicon.ico HTTP/1.1" 404 209

尝试通过 VPN 连接到服务器后没有显示新日志

答案1

首先,确保您从家庭网络外部测试您的 Web 服务器(您不能从防火墙后面进入防火墙前面)。

另外,尝试禁用 Web 服务器上的任何本地防火墙并再次测试。

相关内容