Password protected folder help

Discussion in 'General' started by kopite, Feb 17, 2010.

  1. kopite

    kopite New Member

    Hey everyone.

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

    .htaccess file as follows.

    Code:
    uthName .Admin Area.
    AuthType Basic
    AuthUserFile /var/www/###.co.uk/.htpasswd
    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?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    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.
     
  3. kopite

    kopite New Member

    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 212.23.9.240] /var/www/####.co.uk/web/test/.htaccess: AuthName takes one argument, The authentication realm (e.g. "Members Only")
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

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

    kopite New Member

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

    Feel like a complete idiot now :)

    Thanks for the help till
     

Share This Page