auth_basic & avoiding duplication in conf file
mike
mike503 at gmail.com
Thu Nov 13 01:13:32 MSK 2008
You can put it in an include and then include yourauthconf.conf;
That's the quick and dirty idea..
On Wed, Nov 12, 2008 at 2:05 PM, Adriano Nagel <adriano at peabirus.com.br> wrote:
> Hi,
>
> Sorry if this is a faq. I started using v0.6.32 and I have to turn on
> / off auth based on the url.
>
> I have something like:
>
> server {
> auth_basic ...
>
> location ~* jpeg {
> }
>
> location /home/return {
> auth_basic off
> }
>
> location / {
> several_config_lines
> }
> }
>
> The problem is, I would like "involved_config" to apply to
> "/home/return" as well, but I don't want to copy it there.
>
> I can't move it to server, because it shouldn't apply to other
> location directives (eg jpeg).
>
> Is there a clean way around it?
>
> Thanks,
>
> --
> Adriano
>
>
More information about the nginx
mailing list