歡迎您光臨本站 註冊首頁

關於nginx的rewrite 問題,if中怎麼用正則匹配http://IP/image的問

  關於nginx的rewrite 問題,if中怎麼用正則匹配http://IP/image的問



我的server
server   {
            listen       80;
        server_name       192.168.25.139;

                  location  / {
                  # root html;
                  # index  index.html  index.htm;
                 if ($request_uri  ~*  ^~http:\/\/192\.168\.25\.139\/image\/)
                   {
                   rewrite    ^/image/(.*)$   http://192.168.24.9/$1 last;
                 }
              }
}
這樣老是匹配不到,
日誌顯示如下
它總是去找根,而不是轉發到192.168.24.9這台上

*23 open() "/usr/local/nginx/html/image/t_photo/imageFile/DSfs1120110713092556122c63a6" failed (2: No such file or directory)


這是為什麼?

[火星人 ] 關於nginx的rewrite 問題,if中怎麼用正則匹配http://IP/image的問已經有470次圍觀

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