title: Elastic load balancer and https
body: <p>I am working with Elastic Beanstalk and am having some trouble with SSL configuration.</p>
  
  <p>I have an environment consisting of a Load Balancer and a single EC2 instance at the moment.  The Load Balancer has listeners on port 443 and 80.  The EC2 instance in the environment is running tomcat on port 80.  I have a certificate in place in the load balancer and I am able to access the site on port 443 and 80 and everything is worked fine.</p>
  
  <p>The problem is that I would like all requests to be redirected to port 443, even ones that come in on port 80.  I have searched high and low for a way to do this without having to change my security configuration.  This is a small webapp running on Tomcat 7 with Spring security and MVC.  I tried using</p>
  
  <pre><code>&lt;sec:intercept-url pattern="/**" requires-channel="https"/&gt;
  </code></pre>
  
  <p>but I have several pages that are not part of the filter chain as such</p>
  
  <pre><code>&lt;sec:http pattern="/login.html" security="none"  /&gt;
  </code></pre>
  
  <p>This seems like something that could solved at the load balancer but I do not have much experience with setting up SSL.  Any help is appreciated.</p>