1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

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