apache htaccess not working

Discussion in 'Apache' started by kayd, Oct 5, 2012.

  1. #1
    I created the .htaccess file as well as password file. the htaccess file looks like

    AuthType Basic
    AuthName "Restricted Area"
    AuthUserFile /dir1/dir2/auth/restricted.pwd
    AuthGroupFile /dir1/dir2/auth/restricted.grp require valid-user

    the restricted password file contains the
    username/password

    admin_user:2gE9XovzMavhw

    After restarting apache i can still see the directory and username / password did not pop up

    is there something i am missing?do i need to install a specific module in apache
     
    kayd, Oct 5, 2012 IP
  2. pr0t0n

    pr0t0n Well-Known Member

    Messages:
    243
    Likes Received:
    10
    Best Answers:
    10
    Trophy Points:
    128
    #2
    require valid-user
    Code (markup):
    Above code needs to be in a separate line. You are missing one new line there, so try changing it to this:

    
    AuthType Basic 
    AuthName "Restricted Area"
    AuthUserFile /dir1/dir2/auth/restricted.pwd
    AuthGroupFile /dir1/dir2/auth/restricted.grp
    require valid-user
    
    Code (markup):
     
    pr0t0n, Oct 7, 2012 IP