【发布时间】:2016-03-25 16:37:38
【问题描述】:
我在本地使用 WAMP 构建了 2 个网站,我希望让本地网络中的任何人都可以访问它。
我在 httpd-vhosts.conf 中设置了 2 个虚拟主机,配置如下:
#Vistage
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "c:/wamp/www/vistagebusinessexpo.com"
ServerName vistagebusinessexpo.local
ServerAlias www.vistagebusinessexpo.local
ErrorLog "logs/dummy-host2.example.com-error.log"
CustomLog "logs/dummy-host2.example.com-access.log" common
<Directory "C:/wamp/www/vistagebusinessexpo.com">
AllowOverride All
Options Indexes FollowSymLinks
Require local
</Directory>
</VirtualHost>
#CaterCon
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.example.com
DocumentRoot "c:/wamp/www/catercon.com"
ServerName catercon.local
ServerAlias www.catercon.local
ErrorLog "logs/dummy-host2.example.com-error.log
CustomLog "logs/dummy-host2.example.com-access.log" common
<Directory "C:/wamp/www/catercon.com">
AllowOverride All
Options Indexes FollowSymLinks
Allow from 127.0.0.0/8 localhost ::1 10.1.1
</Directory>
</VirtualHost>
我的Windows/System32/drivers/etc/hosts文件配置如下:
127.0.0.1 localhost
127.0.0.1 vistagebusinessexpo.local
::1 vistagebusinessexpo.local
127.0.0.1 catercon.local
::1 catercon.local
问题是每次我尝试从我们网络中的任何其他计算机连接时,我都会收到“错误 403 访问被拒绝/禁止”
到目前为止,我尝试了多种建议:
- 点击“Put Online”按钮并尝试使用 IPAdress/website.local 访问网站
- 修改 httpd.conf 文件以允许访问我们本地网络上的所有 IP
- 将 httpd.conf 文件修改为“allow from allow”
现在我的解决方案已经用完了
【问题讨论】:
标签: apache wampserver