Page 1 of 1

Enable Remote Access to phpMyAdmin 7.0.8

PostPosted: 01. August 2016 14:58
by Jiffylust
Hello,

Having some problems enabling remote access to phpMyAdmin. This topic is covered in he HOW-TO Guides but it seems to be out of date. Every forum post I can find about this says I need to follow this procedure.
________________________________________________
To enable remote access to phpMyAdmin from other hosts, follow these steps:
1) Edit the apache/conf/extra/httpd-xampp.conf file in your XAMPP installation directory (usually, C:\xampp).

2)Within this file, find the line below:
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
Update this line and remove phpmyadmin from the list of locations, so that it looks like this:
<LocationMatch "^/(?i:(?:xampp|security|licenses|webalizer|server-status|server-info))">

3)Restart the Apache server using the XAMPP control panel.
__________________________________________________

But the httpd-xampp.conf file for 7.0.8 doesn't have the "<Location Match"..... anywhere in it?

Thanks,
Anthony

Re: Enable Remote Access to phpMyAdmin 7.0.8

PostPosted: 01. August 2016 18:53
by Jiffylust
Never mind,

You replace all the "Require local" to "Require all granted"

Re: Enable Remote Access to phpMyAdmin 7.0.8

PostPosted: 01. August 2016 19:02
by Altrea
Jiffylust wrote:You replace all the "Require local" to "Require all granted"

That is the least recommend workaround.

This is recommend:
  • Open your \xampp\apache\conf\extra\httpd-xampp.conf file
  • Search for the following section
    Code: Select all
    Alias /phpmyadmin "C:/xampp/phpMyAdmin/"
        <Directory "C:/xampp/phpMyAdmin">
            AllowOverride AuthConfig
            Require local
            ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
        </Directory>
  • Replace the "Require local" Directive with a Require ip whitelist of the IPs you want to allow (example: 192.168.0.0/16 means 192.168.0.0 - 192.168.255.255)
    Code: Select all
    Alias /phpmyadmin "C:/xampp/phpMyAdmin/"
        <Directory "C:/xampp/phpMyAdmin">
            AllowOverride AuthConfig
            Require ip 192.168.0.0/16
            ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
        </Directory>
  • Save the file
  • Restart Apache

Don't replace all Require local. And don't let every request allow to phpmyadmin. This is a huge security issue with the default configuration XAMPP is shipped with.