HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   General (
-   -   Password protected folder help (

kopite 17th February 2010 12:39

Password protected folder help
Hey everyone.

I have been trying to password protect a folder using .htaccess and .htpasswd file

.htaccess file as follows.


uthName .Admin Area.
AuthType Basic
AuthUserFile /var/www/
require valid-user
php_flag register_globals 1

Everytime I try and access the folder however i get an error 500. I have edited the vhost file for the domain and set AllowOverride All. But this still happens.

Any idea?

till 17th February 2010 12:55

If you get an error in the browser, take a look in the error log of the website to find the reason for it.

In the first line of your .htaccess file is a typo, it must be:

AuthName "Admin Area"

and do not edit the vhost file manually as all manual edits will get removed automatically.

kopite 17th February 2010 13:01

Spelling mistake isnt in the proper .htaccess file and was due to bad copypasta :)

The rror logs show:

[Wed Feb 17 11:36:07 2010] [alert] [client] /var/www/ AuthName takes one argument, The authentication realm (e.g. "Members Only")

till 17th February 2010 13:13

Ok, then the error was what I posted above. Please change the line as I told you incl. the correct quotes.

kopite 17th February 2010 13:29

Doh I hadnt twigged on that the " had been changed to .

Feel like a complete idiot now :)

Thanks for the help till

All times are GMT +2. The time now is 06:20.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.