2 messages in ru.sysoev.nginxAuth basic and fast cgi rules with re...
FromSent OnAttachments
tom wangJul 30, 2007 9:16 am 
Igor SysoevJul 30, 2007 10:45 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Auth basic and fast cgi rules with request matched by locationActions...
From:tom wang (toma@public.gmane.org)
Date:Jul 30, 2007 9:16:14 am
List:ru.sysoev.nginx

Hi,

Is there a way for a request to match more than one location statement?

To be more clear, I have the following configuration file:

server { # port to listen on. Can also be set to an IP:PORT listen 80;

# sets the domain[s] that this vhost server requests for #server_name example.com www.example.com; server_name blah.jp www.blah.jp;

# vhost specific access log access_log /var/log/nginx/blah.access_log main; error_log /var/log/nginx/blah.error_log info;

root /site/www; index index.html index.htm index.cgi;

location ~* .cgi$ { satisfy_any on; include /usr/local/nginx/conf/perl.conf;

}

location ~ ^/schedule { auth_basic "Restricted"; auth_basic_user_file /site/htpasswd/schedule/passwd; }

location ~ ^/doumei { auth_basic "Restricted"; auth_basic_user_file /site/htpasswd/doumei/passwd; }

error_page 500 502 503 504 /50x.html; location = /50x.html { root html; } }

Is it possible for one request (for example /doumei/add.cgi) to match both the cgi directive and the basic authentification rules described in location ~ ^/doumei ? I have a lot of cgi script that need to be protected by basic authentification and I'm trying to find the best way to configure this.

Thanks