Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 6 years ago.
I am working with Elastic Beanstalk and am having some trouble with SSL configuration.
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.
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
<sec:intercept-url pattern="/**" requires-channel="https"/>
but I have several pages that are not part of the filter chain as such
<sec:http pattern="/login.html" security="none" />
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.