I've seen alot of people having problem with some .htaccess file, this is another way
to make phpMyAdmin private.
Credits:
Windows version: 100% me
Debian version: 100% Migxxx
WINDOWS VERSION
This is only for xampp 1.7.1 and lower
Made by Kiman
Step 1
Goto C:\xampp\apache\conf\extra and open the httpd-xampp.conf file
!DONT FORGET TO BACKUP THE FILE JUST IN CASE!
Step 2
Find this part in the file
Step 3
If you host at home change
to
If you use a dedicated server change
to
DEBIAN VERSION
Made by Migxxx
For apache:
~: sudo nano /etc/phpmyadmin/apache.conf
WARNING: Do not add Allow Override all into this file or it will SLOWDOWN your phpmyadmin@max
And right under
add:
And add as many ips you want ;p
Also if you want double password protection +IP protection add:
Change the AuthUserFile path to your basic validation file
If you don't know how to generate one auth basic validation file is easy with just one command:
Last step
Restart Apache and MySql and you should only be able to access phpMyAdmin from your localhost/remote computer.
To see if it works, try entering your phpMyAdmin site through another computer.
If you get to a site which gives you access denied. Then you're safe
Rep+ if you found this useful
to make phpMyAdmin private.
Credits:
Windows version: 100% me
Debian version: 100% Migxxx
WINDOWS VERSION
This is only for xampp 1.7.1 and lower
Made by Kiman
Step 1
Goto C:\xampp\apache\conf\extra and open the httpd-xampp.conf file
!DONT FORGET TO BACKUP THE FILE JUST IN CASE!
Step 2
Find this part in the file
Code:
Alias /phpmyadmin "C:/xampp/phpMyAdmin/"
<Directory "C:/xampp/phpMyAdmin">
AllowOverride AuthConfig
Order allow,deny
Allow from all
</Directory>
Step 3
If you host at home change
Code:
Order allow,deny
Allow from all
Code:
Order deny,allow
Deny from all
Allow from 127.0.0.1
If you use a dedicated server change
Code:
Order allow,deny
Allow from all
Code:
Order deny,allow
Deny from all
Allow from YOURREMOTEPCIPADRESS
DEBIAN VERSION
Made by Migxxx
For apache:
~: sudo nano /etc/phpmyadmin/apache.conf
WARNING: Do not add Allow Override all into this file or it will SLOWDOWN your phpmyadmin@max
And right under
Code:
<Directory /usr/share/phpmyadmin>
Code:
Order allow,deny
allow from 192.168.1.4
Also if you want double password protection +IP protection add:
Code:
AuthUserFile /home/gali/.htpasswd
AuthName PhpMyAdmin
AuthType Basic
Require valid-user
Change the AuthUserFile path to your basic validation file
If you don't know how to generate one auth basic validation file is easy with just one command:
Code:
htpasswd -c /path/to/your/file/PasswordFileName username
Last step
Restart Apache and MySql and you should only be able to access phpMyAdmin from your localhost/remote computer.
To see if it works, try entering your phpMyAdmin site through another computer.
If you get to a site which gives you access denied. Then you're safe
Rep+ if you found this useful
Last edited: