开发者社区> 问答> 正文

nginx 如何处理一个tomcat中多个应用的问题呢?

请问nginx 里面该如何处理一个tomcat里多个应用的问题呢?
proxy_pass http://127.0.0.1:8765/dylpy/;
如果填写该路径时,报如下错:
nginx: [emerg] "proxy_pass" may not have URI part in location given by regular expression, or inside named location, or inside the "if" statement, or inside the "limit_except"
请问各位该如何解决,谢谢了!

展开
收起
落地花开啦 2016-03-25 11:05:41 2267 0
1 条回答
写回答
取消 提交回答
  • 喜欢技术,喜欢努力的人

    proxy_pass 后面跟着的内容不能包含路径,路径你可以通过 location 指令来设置,例如
    `location ~ ^/dylpy {
    proxy_pass http://localhost:8765;
    }`

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

相关电子书

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