01-02-2010, 06:34 AM
[eluser]David Cassidy[/eluser]
[quote author="JanDoToDo" date="1262454886"]Dave_C - I tried adding that files snippet but again it doesnt work. It just loads the download page without asking for user/pass:
and in the directory is:
Controllers
home.php
view.php
+SubFolder (and the subfolder contains the .htaccess and download.php as well as all the other controllers for the subsite)
--> .htaccess
--> download.php
<Files download.php>
AuthType Basic
AuthName "Software Download"
AuthUserFile "/home/squaresa/.htpasswds/public_html/lintel/passwd"
Require valid-user
</Files>[/quote]
Passwords are generally stored in a file named .htpasswd in the format of
where there is one user and password per line and the password is not simply plain-text, but an MD5 hash.
Once you've got your .htpasswd file straightened out, make sure the AuthUserFile portion in your Files directive is correct and that the mod_auth module is installed and enabled in Apache.
Also, you should ensure your password file isn't in a public directory. Instead, you should place it in a directory above the root documents folder for security purposes.
[quote author="JanDoToDo" date="1262454886"]Dave_C - I tried adding that files snippet but again it doesnt work. It just loads the download page without asking for user/pass:
and in the directory is:
Controllers
home.php
view.php
+SubFolder (and the subfolder contains the .htaccess and download.php as well as all the other controllers for the subsite)
--> .htaccess
--> download.php
<Files download.php>
AuthType Basic
AuthName "Software Download"
AuthUserFile "/home/squaresa/.htpasswds/public_html/lintel/passwd"
Require valid-user
</Files>[/quote]
Passwords are generally stored in a file named .htpasswd in the format of
Code:
user:password
Once you've got your .htpasswd file straightened out, make sure the AuthUserFile portion in your Files directive is correct and that the mod_auth module is installed and enabled in Apache.
Also, you should ensure your password file isn't in a public directory. Instead, you should place it in a directory above the root documents folder for security purposes.