pathros pathros - 2 months ago 19
Apache Configuration Question

httpd-xampp.conf: How to allow access to an external IP besides localhost?

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, bellow 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 Windows environment.

Answer

Allow from all will not work along with Require local instead of that try Require ip ip.address

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>