XAMPP使用IP地址而不是127.0.0.1或本地主机

问题描述:

我需要使用Android手机访问apache服务器上的文件,因此使用localhost或127.0.0.1将不起作用。我知道需要对httpd-xampp.conf文件进行更改,但不知道需要做哪些更改。XAMPP使用IP地址而不是127.0.0.1或本地主机

编辑:我得到这个画面时,我的IP阿迪 enter image description here

此,我认为需要类型的改变,让我用我的IP地址

# Close XAMPP security section here 
<LocationMatch "^/(?i:(?:security))"> 
Order deny,allow 
Deny from all 
Allow from ::1 127.0.0.0/8 
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var 
</LocationMatch> 

# Close XAMPP sites here 
<LocationMatch "^/(?i:(?:xampp|licenses|phpmyadmin|webalizer|server-status|server-info))"> 
Order deny,allow 
Deny from all 
Allow from ::1 127.0.0.0/8 
ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var 

+0

你在这个视频管解决了我的问题:http://youtu.be/ZUAKLUZa-AU – 2012-09-14 15:28:31

您可以更改Listen 127.0.0.1:80Listen 80。如果您有问题,请告诉我们。

+0

你有没有找到你的配置文件中的行? – 2012-02-08 18:20:51

+0

它应该在那里,因为我自己已经改变它,它对我很有用 – 2012-02-08 18:21:10

+0

它已经设置为80.这个问题是为了与XAMPP添加到应用程序中的新安全概念相关 – 2012-02-08 18:29:51

我更改了配置httpd.conf来收听127.0.0.1:81。当我访问127.0.0.1:81/xampp后,它对我来说工作得很好。

+0

不知道这是回答这个问题。 – 2012-11-18 20:23:23

对我来说有效的是改变了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 

我改变Require localRequire all granted

+0

我怎样才能要求本地和2个特定的IP地址? – Pathros 2015-01-15 16:46:43