问题
I put my WAMP sites on a virtual server and from there I want everybody connected to a VPN to have access to it.
If my server's IP address is 172.13.12.156, after choosing the option Put Online in WAMP, I can access one of the sites like this:
http://172.13.12.156/mysite/
The problem is that I would want to remove access when someone types just:
http://172.13.12.156
so that they won't be able to see the WAMP panel.
Is this possible?
ADDITIONAL INFO
At this moment I have tried:
<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>
回答1:
WAMPServer 2.5 uses Apache 2.4
So first of all dont mix Apache 2.2 syntax with Apache 2.4 syntax (it confuses Apache very easily) in the same section. It is better to use just the new Apache 2.4 syntax anyway.
<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>
来源:https://stackoverflow.com/questions/39787737/enable-local-network-users-to-access-wamp-sites-but-except-localhost-page