Hello, New here, tried to do some due diligence of scouring the web for this answer but all suggestions found didn't function. (read: spent days trying to get this working and now I need an adult:)
I have a RHEL6 box running
Tomcat 7 serving out an instance of
Jenkins.
What I want is to have any requests for
http://myserver.mydomain.com to be immediately redirected to
https://myserver.mydoman.com
Currently I have SSL setup and functioning without issue.
I have iptables configured on the machine to forward 443 to 8443 and if I am to type
https://blah.foo.com it will go to Jenkins no problem.
I was unable to get iptables to forward 80 and 8080 to 8443 without having problems, but I can forward 80 to 8080. 8080 is still listening and any external requests at
http://blah.foo.com will get an unsecured page served no problem.
So maybe more of what I am looking for is to have port 8080 off or forwarding to 8443 internally.
Circumventing the iptalbes and running on localhost I can connect to
http://localhost:8080 and
https://localhost:8443. I have what I though was the proper setup in server.xml and web.xml but 8080 will never forward over to 8443
I am trying to avoid setting up apache in front of tomcat.
THANK YOU!