您的位置 首页 nginx

nginx 转发外部地址

需求:

访问A地址/  都转发到 39.12.12.3:8082

访问A地址/v3 都转到: 10.0.0.3:8080

 

server {
        listen 80;
        server_name uat-b.a.com;
        location / {
            
            proxy_pass http://48.93.190.46:8422;
           # include proxy_params;
          
          proxy_set_header Host $host;
          proxy_set_header X-Real-Ip $remote_addr;
          proxy_set_header X-Forwarded-For $remote_addr;
          }

       location  /v3 {


            proxy_pass http://192.168.1.209:31003;
            include proxy_params;
}
}

 

 

欢迎来撩 : 汇总all

白眉大叔

关于白眉大叔linux云计算: 白眉大叔

热门文章