password protection ".htaccess" not working

Discussion in 'Apache' started by fran1942, Nov 19, 2006.

  1. #1
    Hello, I am trying to password protect a folder.
    I am running the latest Apache on Windows 2000.
    I am not getting any password protection at all. Everything is still wide open.
    Please help me if possible, by taking a quick look at this.

    this is my .htaccess file (my .htaccess file is located in the folder "tan" which is what I want password protected)

    AuthName "Welcome johndoe"
    AuthType Basic
    AuthUserFile "C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\tan\password\"
    Require user johndoe

    this is my .htpasswd file (my .htpasswd is located in the path stated above in AuthUserFile)
    johndoe:$apr1$vd4.....$pKzzFaSCp8XuTBGz0KH2q0

    this is my apache config file (relevant to password protection parts only displayed)

    # First, we configure the "default" to be a very restrictive set of
    # features.
    #
    <Directory />
    Options FollowSymLinks
    AllowOverride none
    Order deny,allow
    Deny from all
    Satisfy all
    </Directory>


    # AllowOverride controls what directives may be placed in .htaccess
    files.
    # It can be "All", "None", or any combination of the keywords:
    # Options FileInfo AuthConfig Limit
    #
    AllowOverride AuthConfig


    # "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin" should
    be changed to whatever your ScriptAliased
    # CGI directory exists, if you have that configured.
    #
    <Directory "C:/Program Files/Apache Software Foundation/Apache2.2/cgi-bin">
    AllowOverride AuthConfig
    Options None
    Order allow,deny
    Allow from all
    </Directory>
     
    fran1942, Nov 19, 2006 IP
  2. andysyme

    andysyme Member

    Messages:
    91
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    43
    #2
    Don't know alot about .htacces on MS - but can you not use Microsofts own security? IE create a user and give only them access to the folder?

    Andy
     
    andysyme, Nov 19, 2006 IP
  3. Smyrl

    Smyrl Tomato Republic Staff

    Messages:
    13,740
    Likes Received:
    1,702
    Best Answers:
    78
    Trophy Points:
    510
    #3
    If you are running under cpanel on Apache server it will automatically alter the .htaccess file in such a manner to password protect your folder.
     
    Smyrl, Nov 19, 2006 IP
  4. thuonghieu

    thuonghieu Peon

    Messages:
    105
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0