httpd-xampp.conf:如何允许访问除localhost之外的外部IP?

我还没有find正确的答案,在其他问题上适用于我。 这是httpd-xampp.conf最初的样子:

# # New XAMPP security concept # <LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))"> Require local ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var </LocationMatch> 

我需要做什么,如果我想添加另一个IP地址除了需要本地?

例如,波纹pipe要求本地我已经尝试了以下内容:

 allow from xxx.xxx.xxx.xx 

也就是说:

 # # New XAMPP security concept # <LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))"> Require local allow from xxx.xxx.xxx.xx ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var </LocationMatch> 

但它仍然阻止访问该外部IP。

我该如何解决? 我怎样才能添加更多的IP地址,让他们访问?

我在Windows环境下使用XAMPP 5.6.3。

从所有的允许不会与当地而不是那个工作要求ip ip.address

例如:

 # New XAMPP security concept # <LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))"> Require local Require ip 10.0.0.1 ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var </LocationMatch> 

我试过这个,它的工作原理。 不过要小心。 这意味着你局域网中的任何人都可以访问它。 Deepak Naik的答案更安全。

 # # New XAMPP security concept # <LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))"> # Require local Require all granted ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var </LocationMatch> 
 <Directory "C:/xampp/"> AllowOverride AuthConfig Limit Order allow,deny Allow from all Require all granted </Directory> 

这是我在标签之前添加的\ xampp \ apache \ conf \ extra \ httpd-xampp.conf文件

将以下代码添加到文件d:\ xampp \ apache \ conf \ extra \ httpd-xampp.conf中:

 <Ifmodulee alias_module> ... Alias / "d:/xampp/my/folder/" <Directory "d:/xampp/my/folder"> AllowOverride AuthConfig Limit Order allow,deny Allow from all Require all granted </Directory> 

以上配置可以访问http://127.0.0.1/

注意:有人建议从Require local取代Require all granted但不为我工作

 <LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))"> # Require local Require all granted ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var </LocationMatch> 
 <Directory "E:/xampp/phpMyAdmin/"> AllowOverride AuthConfig Limit Order allow,deny Allow from all Require all granted 

在Windows中,所有你需要做的就是去Windows搜索允许通过Windows防火墙的应用程序。点击允许另一个应用程序选择Apache并标记公共和私人两个。 打开cmd,按windows键+ r写cmd比cmd写ipconfig找出你的ip。 比打开你的浏览器记下你的ip http://172.16..x ,你将会在xampp启动页面上。如果你想访问你的本地站点,简单地把你的ip放在/ infront例如http://192.168.1 .x / yoursite 。 现在您可以在私人网络电脑上访问您的网站。

我希望这能解决你的问题

在您的防火墙中打开新的应用程序“HTTPD”(Apache服务器)

看看这个: https : //www.youtube.com/watch?v=eqgUGF3NnuM