title: Nginx reverse proxy for tomcat
body: <p>I am having issues getting my nginx + tomcat 7 reverse proxy setup working.</p>
  
  <p>Basically I want <code>https://192.168.10.101</code> to serve content from the upstream cluster/webapp/; However I am getting a 404 page from my applicaton.</p>
  
  <p>Any hints on whats going wrong would be greatly appreciated.</p>
  
  <p>My configuration is given below.</p>
  
  <pre><code>server {
  
              server_name 192.168.10.101;
              access_log /var/log/nginx/mysite-access.log;
              listen   443;
              ssl on;
              ssl_certificate    /etc/nginx/ssl/mysite.crt;
              ssl_certificate_key    /etc/nginx/ssl/private/mysite_pvt.key;
  
                  location  / {
                          proxy_redirect off;
                          proxy_pass      https://tccluster/webapp/;
                          rewrite_log     on;
  
                          proxy_set_header   Host             $host;
                          proxy_set_header   X-Real-IP        $remote_addr;
                          proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
                          proxy_max_temp_file_size 0;
  
                  }
  }
  
  upstream  tccluster  {
                  server   192.168.56.103:8443;
                  server   192.168.56.104:8443;
  }
  </code></pre>