htaccess woes
MKlinke
mklinke at axsi.com
Mon Jul 26 12:57:29 UTC 2004
On Monday 26 July 2004 05:13, kenwardc wrote:
> Hi All
>
> My first post to this forum so be gentle! ;-)
>
> Have just installed a new Linux Red Hat server and am trying to
> protect the phpMyAdmin folder with .htaccess. Having trouble and
> wanted to know if there were any experts out there!
>
> 1. I go to the folder I wish to protect
> 2. I type htpasswd -c htaccess username
> 3. I am prompted for the password and the retype
> 4. File appears to save OK.
>
> If I then try to access that folder I get the web page straight
> away. Most frustrating - I was expecting it to as for a password.
>
> Any help gratefully accepted.
>
> Regards
> Chris
>
It sounds like you're putting the wrong file in the web site folder.
Your setup should look something like below:
Regards, Mike Klinke
---------------------------
---- /etc/httpd/conf/httpd.conf -----
<Directory "/var/www/html/protected_directory">
AllowOverride AuthConfig
Order deny,allow
Allow from all
</Directory>
---- end of httpd.conf ---
---- /etc/httpd/authorized_users (build with htpasswd)
user1:password
user2:password
----- end of authorized_users ----
----- /var/www/html/protected_directory/.htaccess -------
AuthName "Presentation"
AuthType Basic
AuthUserFile authorized_users
require valid-user
---- end of .htaccess ---
Double check all file/directory permissions to make sure they're
readable.
More information about the redhat-list
mailing list