歡迎您光臨本站 註冊首頁

nginx重寫規則

←手機掃碼閱讀     火星人 @ 2014-03-03 , reply:0

nginx重寫規則

nginx重寫規則


本人是一個新手,請教以下問題中$1$2的值從那傳送過來,分別代表什麼意思server {
        listen       8080;
        server_name www.a.cn www.b.cn www.c.cn .d.org .e.com f.com;
              server_name_in_redirect off;
        access_log /usr/local/nginx/logs/nginx/www.cn.access.log main;
        error_log  /usr/local/nginx/www.cn.error.log;
        include proxy.conf;
        expires 1d;
        location  /abc {
            if ( -d $request_filename ) {
                rewrite ^/(.*)([^/])$ http://$host/$1$2/ break;
            }
            index index.html;
            root html;
        }
        location ~* ^/(aa|bb|cc) {
                proxy_pass http://f.com;
                break;
        }
        location ~* ^/.*\.apk {
            root html;
        }
請教:      
  location ~* ^/.*\.apk {
            root html;
        }
代表什麼意思

    if ( -d $request_filename ) {
                rewrite ^/(.*)([^/])$ http://$host/$1$2/ break;
        }
代表什麼意思
《解決方案》

......................................

[火星人 ] nginx重寫規則已經有479次圍觀

http://coctec.com/docs/service/show-post-2378.html