防止通过IP从另一台本地PC访问XAMPP localhost

时间:2013-02-21 13:47:01

标签: xampp localhost

众所周知如何从本地网络中的另一台计算机访问XAMPP站点(通过输入IP地址),请告诉我如何禁止这样做,并且仍然有一个正在运行的本地主机。

3 个答案:

答案 0 :(得分:2)

您可以使用apache.conf文件来阻止它 你应该更新你的文件

评论

 comment the "require all granted "
  Add "Require ip 127.0.0.1"
  restart apache  

know more "DEMO"

答案 1 :(得分:1)

多么简单,

只需创建一个名为 index.php / index.html

的文件

然后将它们留空,

现在任何访问你的ip的人都会被重定向到index.php而他们无法知道你有哪些文件。

希望这个答案有所帮助。

答案 2 :(得分:0)

localhost(适用于IPv4的127.0.0.1)只能从本地主机访问。查找任何“Listen”和“VirtualHost”指令,并确保它们都说“localhost”而不是其他主机名或IP地址。