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

LinuxMySql

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

If you want to access phpMyAdmin from a static IP besides localhost, then you’re in right place, just follow the below steps :-

Step 1 :- First locate httpd-xampp.conf file, for Ubuntu it’s located at /opt/lampp/etc/extra/

Step 2 :- open httpd-xampp.conf file for editing. you’ll find something live below code

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

Step 3 :- add Require ip your_ip_address below Require local .

# New XAMPP security concept
#
<LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-status|server-info))">
    Require local
    Require ip 10.0.0.1  // provide your static ip here.
    ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</LocationMatch>

Step 4 :- Add your static IP address after Require ip your_static_ip.

It’s Done.

Now Check to access your_ip_address/phpmyadmin