Because there are webservice services in my project, it's necessary to comb through the problems I've encountered. 1. Webservice cannot be started at the same time on the same machine
Problem Description:
The Nginx cluster cannot be started at the same time--the port is occupied because the webservice is first started by Tomcat on the same computer.
Workaround:
Method One, prepare two servers, deploy the project to the Tomcat application server separately.
Method Two, in the same computer, change one of the Tomcat's WebService port (this method changes the port does not recommend adoption). 2, WebService can't open [Nginx not do WebService agent]
Problem Description:
Due to the problem described in 1, the test on this machine so that the port was changed to 8088 and 8090;nginx.conf set two Tomcat server address, so through the nginx can quickly access to the project dynamic or static pages and resources. But through http://localhost:8088/mobilewebservice?wsdl and http://localhost:8090/mobilewebservice?wsdl but how also can not access to webservice.
Note: The localhost here is the Nginx local access path instead of the usual localhost that we tomcat access, although very similar but not the same thing, nginx defaults to 80 ports and the tomcat default port is 8080.
Workaround:
Try the original WebService access address-that is, Tomcat's address before the load balancing is configured. Access to Tomcat's WebService address: http://192.168.1.147:8090/mobilewebservice?wsdl and http://192.168.1.147:8088/ MOBILEWEBSERVICE?WSDL access was successful, indicating that Nginx load balancing does not affect Tomcat's original webservice, so how to access it now.
Note: The access port for my webservice is 8088 and 8090.