September 14, 2011 11:46PM
Yes, It is good for you to NGINX in front of your application server, for that you will gain extra features, ie. load-control and DoS tolerance for your stability.

And it is simple for you to configure NGINX to use tomcat as backend. When your tomcat listens localhost:8080, the nginx configuration may be like this:

>>> location / {
>>> proxy_pass 127.0.0.1:8080;
>>> proxy_set_header Host $host;
>>> proxy_set_header X-Real-IP $remote_addr;
>>> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
>>> }

so you will get the clients' real IP from the HTTP header "X-Real-IP"

hope this helps
Subject Author Posted

Nginx + Tomcat7 for single webapp and multiple alias domain

tm1978 September 14, 2011 07:26AM

Re: Nginx + Tomcat7 for single webapp and multiple alias domain

cfsego September 14, 2011 11:46PM

Re: Nginx + Tomcat7 for single webapp and multiple alias domain

Mikhail Mazursky September 15, 2011 05:32AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 72
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready