location / { sub_filter '<a href="http://127.0.0.1:8080/' '<a href="https://$host/'; sub_filter '<img src="http://127.0.0.1:8080/' '<img src="https://$host/'; sub_filter_once on; }
替換掉proxy_pass頁面中的內容
location ~ ^/live800 { proxy_pass http://218.23.24.53; rewrite ^/live800/(.*) /$1 break; proxy_set_header Accept-Encoding ""; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host www.abc.com; sub_filter_types text/html text/css text/xml text/css text/javascript; sub_filter 'www.abc.com' '$host'; sub_filter_once off; }