lnmp nginx反向代理设置

付费节点推荐


免费节点


节点使用教程


配置目录: /usr/local/nginx/conf/vhost/xxxx.conf

 

location /{

proxy_ssl_server_name on;

proxy_pass https://us.shein.com/;

}

 

location ^~ /{

proxy_ssl_server_name on;
proxy_pass https://itlanyan.com;
sub_filter 'itlanyan.com' 'itlanyan.wpcoder.cn';

proxy_set_header Host $proxy_host; # 修改转发请求头,让8000端口应用收到真实请求
proxy_set_header X-Real-Ip $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

sub_filter '</body>' '<script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-6138342451093224" crossorigin="anonymous"></script></body>';

sub_filter_once off;

sub_filter_types *;

proxy_set_header Accept-Encoding "";

add_header Cache-Control no-cache;

}

未经允许不得转载:Bcoder资源网 » lnmp nginx反向代理设置

相关推荐

赞 (23)
分享到:更多 ()