bug*_*lan 4 lan wamp wampserver
当我尝试从另一台设备(与LAN连接)访问本地网站时,出现“禁止访问”错误。
我试图编辑Apache的httpd.conf(如Google所说),修复vcredist软件包,完全卸载wamp并安装(重新下载最新版本),停用防病毒软件(我正在使用BitDefender btw)。
大约1个月前,我正在使用Windows 7,wamp运行良好。升级到Windows 10后,我清理了电脑并安装了Wamp。一开始,我不需要在线模式,但是现在,我需要它。因此,我对所有新想法持开放态度。
注意
-我可以用我的PC到达localhost(具有LAN IP,Router IP和http:// localhost)
-我正在使用Windows 10专业版x64
大约3周前,我开始使用新的路由器。能引起这个问题吗?还是我无法正确安装驱动程序?
小智 5
不要编辑http.config而是编辑httpd-vhosts.config
<VirtualHost *:80>
ServerName localhost
DocumentRoot c:/wamp/www
<Directory "c:/wamp/www/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
将要求本地更改为要求全部授予。当它是Require local时,只能通过localhost请求从其他主机访问,否则会被拒绝。最后看起来像下面
<VirtualHost *:80>
ServerName localhost
DocumentRoot c:/wamp/www
<Directory "c:/wamp/www/">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2401 次 |
| 最近记录: |