Easy question on .htaccess and Apache

Skip to first unread message


Sep 8, 2000, 2:16:45 PM9/8/00
You got a bit carried away with cross-posting an apache related

This is a FAQ covered in the Apache documentation.

On Fri, 08 Sep 2000 13:27:15 +0100, tha...@uk.uk wrote:

>We've got Apache running on Redhat linux.
>For some reason, it won't process the .htaccess file when you upload
>the file and try to browse the protected directory.
>The server is allowing the user to view the whole directory (like if
>there is no .htaccess file there at all)
>I know I am looking the right directory because I can see my other
>files in there.
>I have placed the .htaccess and .htpasswd files in the directory I
>wish to protect.
>The .htaccess is correct because I had it working with a test account
>down at hypermart.net
>Any ideas why it won't work on Apache ?
>Our httpd.conf is set up as below,
># This controls which options the .htaccess files in directories can
># override. Can also be "All", or any combination of "Options",
># "AuthConfig", and "Limit"
> AllowOverride All
># AccessFileName: The name of the file to look for in each directory
># for access control information.
>AccessFileName .htaccess
># The following lines prevent .htaccess files from being viewed by
># Web clients. Since .htaccess files often contain authorization
># information, access is disallowed for security reasons. Comment
># these lines out if you want Web visitors to see the contents of
># .htaccess files. If you change the AccessFileName directive above,
># be sure to make the corresponding changes here.
># Also, folks tend to use names such as .htpasswd for password
># files, so this will protect those as well.
><Files ~ "^\.ht">
> Order allow,deny
> Deny from all
>.htaccess is (and I've tried changing the path of AuthUserFile too)
>AuthName restricted stuff
>AuthType Basic
>AuthUserFile /.htpasswd
>require valid-user
>And I've also tried .htaccess:
>AuthName "restricted stuff" #note you have to put quotes around this
>AuthType Basic
>AuthUserFile /home/user/public_html/.htpasswd
>AuthGroupFile /dev/null
><Limit GET>
>require valid-user

Reply all
Reply to author
0 new messages