RE: protecting a list of specific urls

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

 



Thanks Colin, yes I did know that :-) I like the idea of just being able to cut and paste any url I want to protect into a list without the worry of regex though.


Date: Fri, 25 Oct 2013 14:08:28 +0200
From: colin@xxxxxxxxxxxxxx
To: users@xxxxxxxxxxxxxxxx
Subject: Re: protecting a list of specific urls

Hi Edward,

You do know that Location supports regular expressions? You should be able to collapse all 3 into a single Location something like the following:

<Location ~ "^/(site1/abc|site2/tux|site3/zzz)">
        AuthType Basic
        AuthName "Administrators"
        AuthBasicProvider ldap-centos
        Require valid-user
</Location>


Cheers,

Colin


On 25 October 2013 12:37, Edward Quick <edwardquick@xxxxxxxxxxx> wrote:
Hi group,

I have a list of specific urls I want to protect, for example:

/site1/abc
/site2/tux
/site3/zzz

which I can configure in separate location blocks like below and that works fine. However I was wondering if there is a simpler way I can do this like a url whitelist file instead?

Thanks,
Ed

<Location /site1/abc>
        AuthType Basic
        AuthName "Administrators"
        AuthBasicProvider ldap-centos
        Require valid-user
</Location>


<Location /site2/tux>
        AuthType Basic
        AuthName "Administrators"
        AuthBasicProvider ldap-centos
        Require valid-user
</Location>

<Location /site3/zzz>
        AuthType Basic
        AuthName "Administrators"
        AuthBasicProvider ldap-centos
        Require valid-user
</Location>



[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