2

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).

ray
  • 123
  • 5

1 Answers1

1

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.

sandroid
  • 1,724
  • 12
  • 16