apache .htaccess not working

Discussion in 'Site & Server Administration' 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 directoryis there something i am missing?do i need to install a specific module in apache?
     
    kayd, Oct 5, 2012 IP
  2. MilesWeb

    MilesWeb Well-Known Member

    Messages:
    869
    Likes Received:
    35
    Best Answers:
    7
    Trophy Points:
    173
    #2
    First check if the mod rewrite is compiled on the server. Command to check it is

    Consider referring error log files as well. They will report errors which might help to fix the issue.
     
    MilesWeb, Oct 6, 2012 IP
  3. RoseHosting

    RoseHosting Well-Known Member

    Messages:
    230
    Likes Received:
    11
    Best Answers:
    11
    Trophy Points:
    138
    #3
    Check your Apache configuration file and make sure that you have ‘AllowOverride AuthConfig’ directive within the ‘DocumentRoot’ directory entry. Also, the password file should be readable by Apache.
     
    RoseHosting, Oct 6, 2012 IP