开发者社区> 问答> 正文

对于Nginx反向代理Tomcat的问题

今天在做Nginx反射代理Tomcat,Nginx如何反向代理Tomcat的.action网页?
2
后台日志:
2016/05/22 05:15:59 [error] 26165#0: *1 upstream timed out (110: Connection timed out) while reading response header from upstream, client: 192.168.1.3, server: localhost, request: "GET /bank/zsyh.action HTTP/1.1", upstream: "http://127.0.0.1:8080/bank/zsyh.action", host: "192.168.1.222", referrer: "http://192.168.1.222/index.jsp"

展开
收起
落地花开啦 2016-03-26 15:14:43 2710 0
1 条回答
写回答
取消 提交回答
  • 喜欢技术,喜欢努力的人

    详细的配置如下:
    `location ~ . *.ation$
    { proxy_cache cache_one;

           proxy_cache_valid 200 304 12h;
           proxy_cache_valid 301 302 1m;
           proxy_cache_valid any 1m;
           proxy_set_header Host   $host;
           proxy_set_header X-Real-IP      $remote_addr;
           proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
           proxy_pass http://bak_server;

    }`

    2019-07-17 19:16:18
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
《Nginx 代理系统常用手册》 立即下载
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载