javaEE
Should we all use Nginx
proxy Tomcat
, or just use Tomcat
port 80
If you use Nginx
proxyTomcat
, is there any problem when logging in from a third party? I don’t know now whether to use Tomcat
directly or Nginx
proxyTomcat
There are no PHP
programs on the server like java
and mysql
. Is it necessary to Nginx
proxy Tomcat
为情所困2017-05-16 17:25:40
javaee can not only use nginx proxy, but also many use apache as a proxy. In theory, any web server can be used as a proxy. Generally, the development and testing environment directly configures tomcat as port 80, and the production environment configures the port separately.
There is no third-party login problem when using nginx to proxy tomcat. They are just front-end static servers.
Whether to use a proxy depends on the business of your website. It is usually necessary because most websites have more static content (or can be staticized). These can return static content directly through the proxy server, which is much more efficient.
PHP中文网2017-05-16 17:25:40
Using Nginx proxy does not affect third-party login. I currently use cas to do single sign-in for multiple systems. All systems use Nginx front-end proxy, which is also tomcat
ringa_lee2017-05-16 17:25:40
Nginx
Generally used for load balancing, virtual hosting (when deploying multiple domain names and multiple applications on the same machine), and stripping static resources from web containers
If you just have a web application, there is no need to add an extra layer of nginx
In addition, nginx will not affect third-party login, it just does one layer of forwarding