允许本地网络用户访问 WAMP 站点,但本地主机页面除外
Enable local network users to access WAMP sites, but except localhost page
我将我的 WAMP 站点放在一个虚拟服务器上,我希望从那里连接到 VPN 的每个人都可以访问它。
如果我的服务器 IP 地址是 172.13.12.156,在 WAMP 中选择 Put Online 选项后,我可以像这样访问其中一个站点:
问题是我想在有人键入时删除访问权限:
这样他们就看不到 WAMP 面板了。
这可能吗?
附加信息
目前我已经尝试过:
<Directory "c:/wamp/www/">
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
<Directory "c:/wamp/www/my_site1/">
# There will be comments here and some options like FollowSymLinks and AllowOverride Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
Allow from all
</Directory>
WAMPServer 2.5 使用 Apache 2.4
所以首先不要在同一部分中混合使用 Apache 2.2 语法和 Apache 2.4 语法(这很容易混淆 Apache)。最好只使用新的 Apache 2.4 语法。
<Directory "c:/wamp/www/">
Require local
</Directory>
<Directory "c:/wamp/www/my_site1/">
Require all granted
# plus any other Options etc that are required by this site
</Directory>
我将我的 WAMP 站点放在一个虚拟服务器上,我希望从那里连接到 VPN 的每个人都可以访问它。
如果我的服务器 IP 地址是 172.13.12.156,在 WAMP 中选择 Put Online 选项后,我可以像这样访问其中一个站点:
问题是我想在有人键入时删除访问权限:
这样他们就看不到 WAMP 面板了。
这可能吗?
附加信息
目前我已经尝试过:
<Directory "c:/wamp/www/">
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
</Directory>
<Directory "c:/wamp/www/my_site1/">
# There will be comments here and some options like FollowSymLinks and AllowOverride Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
Allow from all
</Directory>
WAMPServer 2.5 使用 Apache 2.4
所以首先不要在同一部分中混合使用 Apache 2.2 语法和 Apache 2.4 语法(这很容易混淆 Apache)。最好只使用新的 Apache 2.4 语法。
<Directory "c:/wamp/www/">
Require local
</Directory>
<Directory "c:/wamp/www/my_site1/">
Require all granted
# plus any other Options etc that are required by this site
</Directory>