1

だから私は2つのルートを持っています.1つ目は、ドキュメントがそうすべきだと言っているように、ルートマッチングを停止しません:

location ^~ /p/ {
    root /www/domain.com/;
    try_files $uri $uri/ /path/index.html;
}

location ^~ /v/ {
    root /www/domain.com/;
    try_files $uri $uri/ /path/index.html;
}

location ^~ / {
    root /www/domain.com/php_www/;
    try_files $uri $uri/ /index.php;

        location ~* \.(?:php|html)$ {   
            try_files $uri =404;
            fastcgi_pass 127.0.0.1:9000;
            include /etc/nginx/fastcgi_params;
        }

        auth_basic "Staging";
        auth_basic_user_file /www/.htpasswd;

}

したがって、次のような URL がある場合:

http://domain.com/p/1234567890

最初のルートではなく、最後のルートに一致します。私たちの担当者の 1 人がアプリケーションにページを追加したため、問題が表面化しました。

http://domain.com/privacy

これはFIRSTルートでピックアップ?? 問題はどこから来ているのですか。

私が抱えている問題は^〜です。ドキュメントでは、これが一致すると一致を停止すると書かれていますが、最後のルートが常に読み込まれます。

何か案は?

4

1 に答える 1

0

Upgraded to latest nginx, and re-ordered some of the directives and everything is working now.

于 2012-08-31T17:40:42.880 に答える