• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

MySQL [Windows/Debian] How to make phpMyAdmin private

Kiman

Reality OT Staff
Joined
Aug 18, 2009
Messages
530
Reaction score
7
Location
Sweden
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
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
to
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
to
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>
add:
Code:
        Order allow,deny
        allow from 192.168.1.4
And add as many ips you want ;p

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 :p

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:
Lol, so you have to host otserv on your pc, gratz.
 
Lol, so you have to host otserv on your pc, gratz.

Ops, forgot it ;p as mentioned, it's the first time i'm writing a tutorial.

Added how to make it work on dedicated server in the guide.

Enjoy
 
Last edited:
Mod, could you please change the name of the thread to:
Deny connections to phpMyAdmin except desired people
 
this doesnt work for me. idk why, it just forbids me from using phpmyadmin
then when i put it back to Allow for All it works.
 
Do you use a dedicated server or do you host it on your own computer?
 
The latest version of Xampp (1.7.2) has this feature enabled by default, but good catch for people who don't update regularly.
 
As Xar said, This is for the old versions. Many, and I really mean many people host their servers unprotected nowadays.
 
Last edited:
=O cool xD but can u help me? xD i got hacked n im try to flix.
i did change the

Order allow,deny
Allow from all

like u say, i use 1.6.6 version, my server is on a Dedicate, but i use xammp, n when i try to acces from my home i can. why? if i put

Order deny,allow
Deny from all
Allow from 127.0.0.1
can u help me?
 
=O cool xD but can u help me? xD i got hacked n im try to flix.
i did change the

Order allow,deny
Allow from all

like u say, i use 1.6.6 version, my server is on a Dedicate, but i use xammp, n when i try to acces from my home i can. why? if i put

Order deny,allow
Deny from all
Allow from 127.0.0.1
can u help me?

Try doing this
Code:
        Order deny,allow
        Deny from all
        Allow from YOURREMOTEPCIPADRESS

Good shit.
Definitely using :)

Thank you ;)
 
Back
Top