I have a Spring MVC Application on tomcat (8080) behind nginx proxy server. Also I have 3 different domains:
- www.mywebsite.com for English
- www.mywebsite.de for German
- www.mywebsite.fr for French
Now I have to make sure that, when the user goes to www.mywebsite.de, the language of the site has to be German, *.com should be English and so on.
So how can I achieve this with single tomcat instance?
I could start three tomcat instances:
- localhost:8080 with default locale 'DE'
- localhost:8081 with default locale 'EN'
- localhost:8082 with default locale 'RU'
Then in my ngnix configuration I would forward all requests via proxy_pass in this way:
- domain.de -> localhost:8080
- domain.com -> localhost:8081
- domain.ru -> localhost:8082
This means I have to maintain 3 tomcat instances. Thats why this question.
?lang=en- dieter