Page 1 of 1

Basic HTTP Auth

Posted: Thu Jul 17, 2003 3:39 pm
by uberpolak
I'm trying to get a heavily database-reliant site off the ground, and since my host doesn't allow external connections to MySQL, I've had to resort to installing phpMyAdmin. The installation is fine, but I want to install an HTTP auth scheme so phpMyAdmin isn't accessible to anyone who finds the URL, for hopefully obvious reasons. I've exhausted myself reading every guide I can find about the basic method, and I thought I had a good understanding of it. Evidently I was wrong. Here is how my .htaccess and .htpasswd files look, with the details changed. For the encryption I used an online tool people swear by (the one at http://www.4webhelp.net/), so I'm pretty sure that much is ok (although I could be wrong). Hopefully someone can find the problem here.

.htaccess

Code: Select all

AuthUserFile /full/path/.htpasswd
AuthName phpMyAdminLogin
AuthType Basic
require valid-user
.htpasswd

Code: Select all

admin:encryptedpassword
Thanks for helping.

Posted: Thu Jul 17, 2003 5:24 pm
by mrvanjohnson
Not sure why you are doing this. phpMyAdmin has a couple of built in Authenication methods why wouldn't you use them?

Posted: Thu Jul 17, 2003 5:26 pm
by mrvanjohnson
In the base directory of phpMyAdmin look at config.inc.php. There are three types right there.

Authentication method (config, http or cookie based)

Re: Basic HTTP Auth

Posted: Thu Jul 17, 2003 6:29 pm
by redhair
If you don't want to go through the above solution:
change .htaccess to

Code: Select all

AuthType Basic
AuthName "phpMyAdminLogin"
AuthUserFile /full/path/.htpasswd
require user admin