javaEE
Should we all useNginx
proxyTomcat
, or just useTomcat
port 80
If you useNginx
proxyTomcat
, is there any problem when logging in from a third party? I don’t know now whether to useTomcat
directly orNginx
proxyTomcat
There are noPHP
programs on the server likejava
andmysql
. Is it necessary toNginx
proxyTomcat
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.
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
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 containersIf 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
Use Nginx to proxy Tomcat