Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

Installed phpMyAdmin on Ubuntu 10.10, running apache2. phpMyAdmin resides in /usr/share/, and is accessible because there is alias in apache2.

I'd like to add an .htaccess file for it, but I am unsure of where to place it, or if I should use some other method to prevent the site from being accessed by someone other than me (with password).

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Assuming it's installed in /usr/share/phpmyadmin, you can put the approrpriate .htaccess in /usr/share/phpmysadmin.

That being said, HTTP auth isn't exactly fool-proof if that's what you're looking to use .htaccess for, so I'd instead recommend restricting by IP.

If however your intent is to use http-auth anyway, you can configure phpmyadmin's config.inc.php and set the auth_type to http

I personally would recommend cookie-based auth instead, combined with a somewhat restrictive .htaccess to keep out people you don't want seeing it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.