Load Balancing Apache Tomcat using Nginx.
In this post, we will configure Nginx Server as a load balancer for Apache Tomcat. First, we will provide the configuration of nginx for proxying a single Apache Tomcat instance. Later, we will show how this configuration can be extended for load-balancing a set of Apache Tomcat Servers.
In your nginx server, populate the /etc/nginx/sites-available/default
file with the following content (here we use Ubuntu 14.04).
Reload the above configuration file with sudo service nginx reload
, you should see something like
Then, hit http://nginx.example.com
in your browser. You should see the default Apache Tomcat webpage.
Sources:
Add more
Written on March 13, 2015