httpd-xampp.conf:如何允许访问除 localhost 之外的外部 IP? [英] httpd-xampp.conf: How to allow access to an external IP besides localhost?
问题描述
我还没有在其他问题中找到适合我的正确答案.这是 httpd-xampp.conf
最初的样子:
如果我想在Require local
之外添加另一个IP地址怎么办?
例如,在 Require local
下面我尝试了以下操作:
允许来自 xxx.xxx.xxx.xx
也就是说:
<预><代码>## 新的 XAMPP 安全概念#<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">需要本地允许来自 xxx.xxx.xxx.xxErrorDocument 403/error/XAMPP_FORBIDDEN.html.var</LocationMatch>但它仍然阻止访问该外部 IP.
我该如何解决这个问题?如何添加更多 IP 地址以允许他们访问?
我在 Windows 环境下使用 XAMPP 5.6.3.
allow from all
不能与 Require local
一起使用.相反,请尝试 Require ip xxx.xxx.xxx.xx
例如:
# 新的 XAMPP 安全概念#<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">需要本地需要 ip 10.0.0.1ErrorDocument 403/error/XAMPP_FORBIDDEN.html.var</LocationMatch>
I haven't found the right answer that works for me in other questions.
This is how the httpd-xampp.conf
looks like originally:
#
# 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>
What should I do if I want to add another IP address besides the Require local
?
For example, below Require local
I have tried the following:
allow from xxx.xxx.xxx.xx
That is to say:
#
# 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>
But it still blocks the access to that external IP.
How do I fix this? How can I add more IP addresses to allow them access?
I am using XAMPP 5.6.3 under a Windows environment.
allow from all
will not work along with Require local
. Instead, try Require ip xxx.xxx.xxx.xx
For Example:
# 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>
这篇关于httpd-xampp.conf:如何允许访问除 localhost 之外的外部 IP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!