php - linux nginx+tomcat 整合怎么配置8080?
高洛峰
高洛峰 2017-05-16 13:02:36
0
1
413
location ~ .*.jsp$ {     #匹配以jsp结尾的,tomcat的网页文件是以jsp结尾         
                index index.jsp;
                proxy_pass http://127.0.0.1:8080; #主要在这里,设置一个代理
        }

这里的127.0.0.1:8080 就是这样填还是填实际的域名啊? 比如http://www.xxx.com:8080?

高洛峰
高洛峰

拥有18年软件开发和IT教学经验。曾任多家上市公司技术总监、架构师、项目经理、高级软件工程师等职务。 网络人气名人讲师,...

Antworte allen(1)
巴扎黑

访问地址:http://www.xxx.com 配置如下:

      server {
                listen       80;
                server_name  www.xxx.com;

                access_log  logs/xxx.access.log  main;

                location / {
                    root   html;
                    index  index.html index.htm;
                }
                    
                location ~ .*.jsp$ {     #匹配以jsp结尾的,tomcat的网页文件是以jsp结尾         
                    index index.jsp;
                    proxy_pass http://127.0.0.1:8080; #主要在这里,设置一个代理
                }
        }
}
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage