nginx配置如下:
upstream ngrok {
server 127.0.0.1:8810; # 此處端口要跟 啟動(dòng)服務(wù)端ngrok時(shí)指定的端口一致
keepalive 64;
}
server {
listen 80;
server_name *.ngrok.test.com;
#charset koi8-r;
location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host:8810; #此處端口要跟 啟動(dòng)服務(wù)端ngrok 時(shí)指定的端口一致
proxy_set_header X-Nginx-Proxy true;
proxy_set_header Connection "";
proxy_pass http://ngrok;
}
}
大前端知識(shí)庫(kù)收集分享 www.rjxgc.com 壹玖零Tech
搜羅各種前后端奇淫技巧,花式編程思想,日日更新,速來(lái)圍觀吧...
引用鏈接:http://www.wxapp-union.com/portal.php?mod=view&aid=1148