server { listen 84; listen [::]:84; root /data/other/www; index index.html index.htm; charset utf-8; resolver 127.0.0.1; recursive_error_pages on; proxy_intercept_errors on; proxy_buffering off; error_page 302 = @handle_redirect; add_header 'Access-Control-Allow-Origin' '*' always; location @handle_redirect { set $saved_redirect_location $upstream_http_location; proxy_pass $saved_redirect_location; } # HangZhou Unicom location /hzlt/ { rewrite ^/hzlt/([0-9]+)/$ /010/2/$1?virtualDomain=010.live_hls.zte.com last; rewrite ^/hzlt/(.*)$ /010/2/$1 last; } location /010/ { proxy_pass http://124.90.44.40:6060; } # JiangXi Mobile location /jxyd/ { rewrite ^/jxyd/([0-9]+)(/2)?/$ /PLTV/88888888/224/$1$2/01.m3u8 last; rewrite ^/jxyd/(.*)$ /PLTV/88888888/224/$1 last; } location /PLTV/ { proxy_pass http://hwrr.jx.chinamobile.com:8080; } }