Yefei.Blog

个人日记 WIKI

用户工具


代理并替换内容

代理目标网站,并替换HTML内容

server {
  listen 89;
  root /media/sf_work/test;
  try_files $uri $uri/index.html @p;

  location @p {
    proxy_pass http://www.test.com;
    proxy_set_header Host www.test.com;
    proxy_set_header Referer http://www.test.com;
    proxy_set_header Accept-Encoding "";
    proxy_redirect off;
    sub_filter 'href="' 'href="https://www.aaa.com/#';
    sub_filter_once off;
    sub_filter_types text/html;
  }
}

皖ICP备15000265号

皖公网安备 34110302000106号