0
votes

Is it possible to block access to phpMyAdmin page or the xampp Settings page for other computers over the LAN network? But in the same way it should be accessible for localhost or 127.0.0.1, I tried to set in the httpd.conf page as

Listen 127.0.0.1:80

But when I did so I was not able to access the site with the address http://myhostname/website from my computer or from any other computer from the network.

I would like to block the xampp settings page for other computers but they should be able to access the website.

3
Did you try changing \conf\extra\httpd-xampp.conf ? - newTag
Not exactly but i had to comment out the Allow From section completely and add only => Allow From ::1 Thanks for your help.. - Philemon philip Kunjumon

3 Answers

3
votes

To disable access from your network, Open httpd-xampp.conf located in xampp-folder\apache\conf\extra\httpd-xampp.conf

Change this:

<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 \
fe80::/10 169.254.0.0/16

ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

To this:

<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Order deny,allow
Deny from all
Allow from ::1 127.0.0.0/8 \
fc00::/7 10.0.0.0/8 172.16.0.0/12 \
fe80::/10 169.254.0.0/16

ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

Don't forget to restart Apache. Now http://localhost/phpmyadmin will result 403 Forbidden error.

For more info read you can read http://www.hellothupten.com/2013/11/24/block-access-to-phpmyadmin-from-lan-network-on-xampp/

0
votes

You need only to change your httpd conf file.

Comment the value Require all granted by adding a # (#Require all granted), and add Require local for the informations <Directory "C:/xampp/htdocs">

0
votes

Find:

<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
    

Add:

Require local

Make these paths accessible only from the host.