laopo單位需要經常查詢組織機構代碼,但是她們單位的ip被人家屏蔽了,為了laopo查詢方便,特在阿里伺服器上配置了一個反向代理,按如下配置即可成功。
server
{
listen 80;
#listen [ ]:80; p index index.html index.htm index.php default.html default.htm default .php;
root /home/wwwroot/laopo.
xxxxx.net;
location/ {🜎
location/>proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Referer http://www.nacao.org.cn; proxy_set_header Host www.nacao.org.cn; header Accept- Encoding ""; }?access_log /home/wwwlogs/laopo.
o.net.log
以上就介紹了nginx反向代理到特定網站,包括了方面的內容,希望對PHP教程有興趣的朋友有所幫助。