Tomcat multi port domain name access and configuration open gzip compression method

Time:2021-2-26

1. In addition to the default port of 8080, we try to use port 9090 for domain name access and open the server.xml

As shown in the figure:

2. Add the following 9090 code to the code:

As shown in the figure:

3. Access with port 9090

As shown in the figure:

4. Configure gzip in the same way server.xml File, add code

As shown in the figure:

summary

The above is Tomcat’s multi port domain name access and gzip compression method, which Xiaobian introduced to you. I hope it can help you. If you have any questions, please leave me a message and Xiaobian will reply you in time. Thank you very much for your support to developer!
If you think this article is helpful to you, please reprint, please indicate the source, thank you!