nginx配置反向代理

upstream tomcatserver2 {
    server 47.104.186.166:13131;
    }
server {
        listen       23131;
        server_name  47.104.186.166;
 
        #charset koi8-r;
 
        #access_log  logs/host.access.log  main;
 
        location / {
            proxy_pass   http://47.104.186.166:13131;
            index  index.html index.htm;
        }     
    }

这个是我自己配的一个服务,其实就是用nginx换了个监听端口

主要是根据https://blog.csdn.net/xuanjiewu/article/details/79458266这个博文改的

只是最简单的代理 还需要深入学习

类似这样有负载均衡的https://www.cnblogs.com/sixiweb/p/3988805.html

原文地址:https://www.cnblogs.com/heroinss/p/10931238.html