Apache Nested Directory permissions or htaccess

Discussion in 'Apache' started by iconx, Apr 9, 2014.

  1. #1
    Is it possible to lock for example the site down with basic auth and lock a subdirectory of it with a different basic auth? Example:

    http://examplesite.com/

    <LocationMatch "/*">
    AuthType Basic
    AuthName "Main Gate"
    AuthBasicProvider file
    AuthUserFile /etc/accounts
    Require valid-user
    </LocationMatch>

    http://examplesite.com/private/

    <LocationMatch "/private">
    AuthType Basic
    AuthName "Members Only"
    AuthBasicProvider file
    AuthUserFile /etc/private.accts
    Require valid-user
    </LocationMatch>

    - John
     
    iconx, Apr 9, 2014 IP
  2. iconx

    iconx Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #2
    I succeeded in doing this on one system but for some reason the other system ignores it but it uses a different type of auth for /*


     
    iconx, Apr 9, 2014 IP