password authentication with apache..


Results 1 to 4 of 4

Thread: password authentication with apache..

  1. #1
    Join Date
    Jul 2002
    Location
    Chesapeake, VA
    Posts
    252

    Cool password authentication with apache..

    hi all, i have read numerous tutorials about how to set up .htaccess files but still i cant get it working.. here is a sample file that i have.

    AuthType Basic
    AuthName "Password Required"
    AuthUserFile /home/brandon/.htpasswd
    AuthGroupFile /dev/null
    <Limit GET>
    Require user brandon
    </Limit>

    and i have the corresponding .htpasswd file in my home directory. ive also added the following lines to /etc/apache2/httpd.conf


    <Directory /var/www/>
    Options SymLinksIfOwnerMatch
    #AllowOverride None
    AllowOverride AuthConfig
    </Directory>


    /var/www is my DocumentRoot but the test directory ive setup to get the authentication working is /var/www/test. do i need to specify the above settings just for the test dir or shouldnt they cover any dir under the DocumentRoot? any ideas on what im doing wrong? all the tutorials make it look so easy but it's just not working for me, unfortunately.

  2. #2
    Join Date
    Aug 2005
    Posts
    86
    You don't have to set the "AuthGroupFile" if there is none.

    Are the following set?

    AccessFileName .htaccess

    <Files ~ "^\.ht">
    Order allow,deny
    Deny from all
    </Files>
    Also, make sure the account Apache runs under has READ rights to .htpasswd.

  3. #3
    Join Date
    Jul 2002
    Location
    Chesapeake, VA
    Posts
    252
    yes AccessFileName and the Files ~ regex are set. Also, in the /etc/apache2/apache2.conf file the user and group are defined as www-data. I had everything set to root but even after changing it to www-data and restarting the server it still didnt prompt me for a password..

  4. #4
    Join Date
    Jul 2002
    Location
    Chesapeake, VA
    Posts
    252
    anyone? anything?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •