Nginx-ru mailing list archive (nginx-ru@sysoev.ru)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Rewrite отрабатывает до auth basic
- To: nginx-ru@xxxxxxxxx
- Subject: Rewrite отрабатывает до auth basic
- From: "aquarius" <nginx-forum@xxxxxxxx>
- Date: Thu, 11 Oct 2012 03:02:03 -0400
- Dkim-signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tigger.jlkhosting.com; s=x; h=Date:Sender:From:Message-ID:Content-Transfer-Encoding:Content-Type:Subject:To; bh=pjedKRMLAk5rCT9utSHh5lH0UsVlUHdRvUYDesULe0Q=; b=HvSVvz2c7MhCguwMY4Iic5U1Bz0WVNQDl+p5wGE2SQe05mSPbHS4FJxxXwyfRCeVVSqFIbskOGaoDPFrtGSKx+dDbzHWjdgIAhN6HuvFOdzmyTkFM6sAwAzK22JubvW9;
location /admin {
auth_basic "admin location";
auth_basic_user_file conf.d/htpasswd;
rewrite ^/([^\/]+)$ /index.php?api=$1;
index index.php;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME
/var/www/htdocs/domain.ru$fastcgi_script_name;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_cache nginxcache;
fastcgi_cache_valid 200 301 302 304 3s;
fastcgi_cache_key
"$request_method|$http_if_modified_since|$http_if_none_match|$host|$request_uri";
fastcgi_ignore_headers "Cache-Control" "Expires"
"Set-Cookie";
fastcgi_cache_bypass $nocache;
fastcgi_no_cache $nocache;
include /etc/nginx/fastcgi_params;
}
location / {
rewrite ^/([^\/]+)$ /index.php?api=$1;
index index.php;
}
если rewrite исключить из локейшена admin, то пароль просит, но ведет не
туда куда надо. Как я понимаю, rewrite отрабатывает раньше auth, куда
копать?
Posted at Nginx Forum:
http://forum.nginx.org/read.php?21,231622,231622#msg-231622
_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://mailman.nginx.org/mailman/listinfo/nginx-ru
|