Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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>
share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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>
share|improve this answer
    
"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 '12 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. –  Shane Madden Nov 10 '12 at 7:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.