Can nginx override encoding of Tomcat back end?

John Moore grails at jmsd.co.uk
Fri Nov 25 14:51:24 UTC 2011


I have been trying for some time now to get Tomcat to serve everything 
with UTF-8 encoding, but some pages keep coming back with ISO-8859-1 
encoding. As Tomcat is sitting behind an nginx remote proxy server, I 
was wondering whether I could configure nginx to override the encoding 
automatically? I have added 'charset utf-8' in the server block but this 
by itself obviously doesn't do the trick. Can I set some response 
headers, perhaps?



More information about the nginx mailing list