upstream disconf {
        server 127.0.0.1:8080; #tomcat服务器的地址
    }

    server {
        listen       8091; #监听端口
        server_name  localhost; #域名
        index index.html;
location
/ { root /usr/local/disconf/war/html; #静态资源目录 index index.html; } location ~ ^/(api|export) {
             proxy_pass http://disconf;  #http://后面的要和upstream保持一致
             proxy_set_header X-Real-IP $remote_addr;
             proxy_set_header X-Scheme $scheme;
 
             proxy_pass_header Server;
             proxy_set_header Host $http_host;
             proxy_redirect off;
        }
     }

 

相关文章:

  • 2022-01-20
  • 2022-12-23
  • 2021-07-15
  • 2022-01-20
  • 2022-03-07
  • 2021-11-30
  • 2021-12-06
  • 2021-12-31
猜你喜欢
  • 2022-12-23
  • 2021-11-30
  • 2021-12-22
  • 2021-10-24
  • 2022-12-23
  • 2021-07-01
相关资源
相似解决方案