Our website is in normal use today. Every time I refresh it, everything is garbled. Many customers are using it, which scares me.
Quickly restart tomcat, but it doesn’t work. I restart nginx several times (use nginx as a reverse proxy). Invalid. Adding the default encoding to the server and restarting it still has no effect. Then directly use tomcat's ip+port to access it, which is normal.
Then I shut down nginx. After searching for the problem for a while, I still couldn't find it. I was going to temporarily switch to apache as a reverse proxy. Then my colleague restarted nginx and everything was fine. Very strange.
The garbled screenshot of the page is as follows:
It may be the following 2 reasons:
1. Encoding problem in nginx reverse proxy configuration
2. Gzip compression problem in nginx reverse proxy