Re: Deny access to all but 2 paths

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux