httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grant <emailgr...@gmail.com>
Subject Re: [users@httpd] Deny access to all but 2 paths
Date Tue, 28 Feb 2012 23:55:51 GMT
> Would this work:
>
> <Location />
> SetHandler perl-script
> PerlResponseHandler ...
> PerlSetVar ...
> </Location>
>
> <Directory "/folder">
> SetHandler None
> AuthType Basic
> AuthName "Admin"
> AuthUserFile /path/to/passwords
> Require user admin
> Options None
> Order allow,deny
> Allow from all
> </Directory>
>
> <Location /folder/file.html>
> SetHandler None
> AuthType None
> </Location>
>
> <Location /folder/file.txt>
> SetHandler None
> AuthType None
> </Location>
>
> I'm hoping that / will be handled by perl-script with the exception of
> everything in /folder, and that everything in /folder will require
> authentication with the exception of /folder/file.html and
> /folder/file.txt.
>
> - Grant

That doesn't work, but this seems to:

<Location />
SetHandler perl-script
PerlResponseHandler ...
PerlSetVar ...
</Location>

<Location /folder>
SetHandler None
AuthType Basic
AuthName "Admin"
AuthUserFile /path/to/passwords
Require user admin
Options None
</Location>

<Location /folder/file.html>
Satisfy Any
</Location>

<Location /folder/file.txt>
Satisfy Any
</Location>

Does that look OK?

- Grant

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message