标签:real real-ip pod 1.0 file iso lenovo nas arp
if ( $http_user_agent ~ "((MIDP)|(WAP)|(UP.Browser)|(Smar
tphone)|(Obigo)|(Mobile)|(AU.Browser)|(wxd.Mms)|(WxdB.Browser)|(CLDC)|(U
P.Link)|(KM.Browser)|(UCWEB)|(SEMC-Browser)|(Mini)|(Symbian)|(Palm)|(Nokia)|(Panasonic)|(MOT)
|(SonyEricsson)|(NEC)|(Alcatel)|(Ericsson)|(BENQ)|(BenQ)|(Amoisonic)|(Amoi)|(Capitel)|(PHILIPS
)|(SAMSUNG)|(Lenovo)|(Mitsu)|(Motorola)|(SHARP)|(WAPPER)|(LG)|(EG900)|(C
ECT)|(Compal)|(kejian)|(Bird)|(BIRD)|(G900/V1.0)|(Arima)|(CTL)|(TDG)|(Da
xian)|(DAXIAN)|(DBTEL)|(Eastcom)|(EASTCOM)|(PANTECH)|(Dopod)|(Haier)|(HAIER)|(KONKA)|(KEJIAN)|
(LENOVO)|(Soutec)|(SOUTEC)|(SAGEM)|(SEC)|(SED)|(EMOL)|(INNO55)|(ZTE)|(iP
hone)|(Android)|(Windows CE)|(Wget)|(Java)|(curl)|(Opera))" ){
rewrite ^/$ http://wap.xxx.cn;
}
这段是用于配置手机访问web站点自动跳转到手机页面。
这个代码需要配置再web站点的service{} 区域里,位置再集群跳转区块前做判断。
location ~ \.(do)$ {
proxy_pass http://upstream;
proxy_set_header Host $host;
proxy_set_header Cookie $http_cookie;
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;
client_max_body_size 10m;
client_body_buffer_size 128k;
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_buffer_size 4k;
proxy_buffers 4 32k;
proxy_busy_buffers_size 64k;
proxy_temp_file_write_size 64k;
}
location ~* ^/(upload)/ {
root /mnt/www;
expires 1d;
}
标签:real real-ip pod 1.0 file iso lenovo nas arp
原文地址:http://blog.51cto.com/3757646/2131846