2020
10-10
10-10
Nginx域名转发使用场景代码实例
场景1:因服务器限制,所以只对外开放了一个端口,但是需要请求不同的外网环境,所以在中转服务器上用nginx做了一次转发实现:server{listen8051;server_namelocalhost;location/license/{proxy_passhttp://xxx.xxx.xxx.xxx:8058/;}location/{proxy_passhttp://xxx.xxx.xxx.xxx:8051/;}}特别注意:敲黑板:此处如果涉及到文件上传的转发,相应在server_name下添加client_max_body_size100m;...
继续阅读 >