title: Authentication on NGINX aganist Tornado
body: <p>well, I just setup NGINX and now its working.
  As my BackEnd WebServer under NGINX I have Python Tornado running:</p>
  
  <p>I only use NGINX for allow big uploads (large-sized), so one of my URL (for upload) is served on NGINX and the rest of URLs are served by Tornado.</p>
  
  <p>I use Sessions provided by Tornado (running at <code>http://localhost:8080/</code>), and NGINX is running at <code>http://localhost:8888/</code>;</p>
  
  <p>Well this is my <code>nginx</code> config file:</p>
  
  <pre><code>location /images/upload {
  
              upload_pass /after_upload;
              .....
              .....
              .....
  }
  
  
  location /after_upload {
          proxy_pass   http://localhost:8080/v1/upload/;
  }
  </code></pre>
  
  <p>As you see, there aren't anything about authentication on <code>NGINX</code>. </p>
  
  <p>URL for <code>proxy_pass</code> requiere a session valid (provided by <code>Tornado</code>)</p>
  
  <p>This is scheme of the system is the following:</p>
  
  <p><img src="https://i.stack.imgur.com/Ik2xm.jpg" alt="enter image description here"></p>
  
  <p>When users log in the system, system create a Tornado (<code>tornado sessions</code>) <code>session</code> in server and in user's Browser, so I need pass authentication to <code>NGINX</code> and continue this authentication process again in Tornado Service.</p>
  
  <p>How I change NginX for authenticate against Tornado?</p>
  
  <p>Thanks in advance</p>