Welcome! Log In Create A New Profile

Advanced

Rewrite отрабатывает до auth_basic

October 11, 2012 03:02AM
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, куда копать?
Subject Author Posted

Rewrite отрабатывает до auth_basic

aquarius October 11, 2012 03:02AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 303
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready