apachexampphttpd.conf

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, 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.


Solution

  • 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>