2

given that Apache applies <Location> directives AFTER <Files> directives, how would one apply a "require all granted" to a single file in a location? in the below wxample, I want the rss feed to be public, while everything else is restricted...

Or will this have to be changed to a <Directory> instead?

Example:

<Location "/doku">
    Options FollowSymLinks
    Order deny,allow
    Allow from all
    AuthBasicProvider ldap
    AuthLDAPURL  --------
    AuthLDAPBindDN   --------
    AuthLDAPBindPassword -------
    AuthType Basic
    AuthName "test"
    Require ldap-user user
</Location>
<Files "/doku/feed.php">
    Allow from all
    require all granted
</Files>

1 Answer 1

1

Require all granted is 2.4 config, while Order/Allow/Deny is 2.2 config - which are you on?

Assuming it's 2.2, try this:

<Directory /path/to/doku>
    # all the existing config
    <Files feed.php>
        Satisfy any
    </Files>
</Directory>
2
  • "Most importantly, <Location> directives should not be used to control access to filesystem locations", a quote from httpd.apache.org/docs/2.2/mod/core.html#location
    – FINESEC
    Nov 9, 2012 at 11:20
  • @FINESEC Well, that only matters when multiple locations point to a single filesystem location, where you want the resources controlled from a filesystem perspective.. but fair enough, edited. Nov 10, 2012 at 7:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .