Copyright 2025 HNCloud Limited.
                    香港联合通讯国际有限公司
                
            
            nginx中请求如何反向代理到tomcat应用服务器上
        
        
            时间 : 2023-05-04 09:43:13
            编辑 : 华纳云
                        阅读量 : 551
        
                
        nginx中请求如何反向代理到tomcat应用服务器上
将以下代码加到nginx网站对应的配置文件中:
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | root /data/0/tomcat7/webapps/WechatSDK;#将请求反向代理到tomcat应用服务器上了 location / {index index.jsp index.html index.htm ;proxy_redirect off;proxy_set_header Host $host;proxy_set_header X-Real-IP $remote_addr;proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;client_max_body_size 10m;client_body_buffer_size 128k;proxy_buffers 32 4k;proxy_connect_timeout 3;proxy_send_timeout 30;proxy_read_timeout 30;proxy_pass http://127.0.0.1:8080;<code class="php plain" style="border: 0px !important; margin: 0px !important; padding: 0px !imp | 
 推荐文章
                推荐文章
             
                     中国香港服务器
                            中国香港服务器
                         日本服务器
日本服务器
                         美国服务器
美国服务器
                         新加坡服务器
新加坡服务器
                         
                     
                         
                             
                 
        