我知道有很多关于这个话题的问题,但我仍然无法让它工作。
我已经在我的笔记本上本地设置了一个 Wordpress 站点和该站点的虚拟主机(通过 Wamp 3.1(,现在我想从同一网络上的另一台 PC 访问它。在本地主机上一切正常。
我的httpd-vhosts.conf
文件如下所示:
# Virtual Hosts
#
#Wamp
<VirtualHost *:80>
ServerName localhost
ServerAlias localhost
DocumentRoot "${INSTALL_DIR}/www"
<Directory "${INSTALL_DIR}/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
#Hp1
<VirtualHost *:80>
ServerName hp1.local
DocumentRoot "d:/wamp64/www/hp1"
<Directory "d:/wamp64/www/hp1">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
Require ip 192.168.100.76
</Directory>
</VirtualHost>
我已将192.168.100.88 hp1.local
(笔记本的 ip(添加到我的 PC 主机文件中。 192.168.100.76 是我的 PC 的 ip。
我可以从笔记本电脑 ping 我的 PC,反之亦然。
我试图通过以下方式访问该网站
http://192.168.100.88
and
http://hp1.local
但无济于事。甚至不是 403 或任何东西,只是
错误:网络超时
编辑:认为我已经尝试过:
- 将端口 80 的入站规则放置到位(在我的电脑上(
- 已停用防火墙(在我的电脑上(
- 将 Apaches httpd.exe 添加到我的主机防火墙例外(解决方案(
Windows Firewall 可能会阻止来自 Apache 的传入连接。为 Wamp 的传入流量添加例外(或者只是将其关闭,但这样做会不利于安全性(。