I have a hangover that runs on Amazon AMI with the apache2. So far, all of my users have accessed my web application by typing port number 8080 into the URL, and then Tomcat is auto-redirecting to 8443.
Now I want all users of 80/443 to access my app. So I configured ssl in Apache to forward all requests from port 80 to 443 and 443 to port 8080. Everything is working well.
The problem is that all the address bars of my existing user have port number 8443 in the URL as autocomplete, and users are most likely just calling this URL. So I want to do a configuration that redirects all 8080/8443 traffic to port 80.
I tried to install iptables-services but could not understand it correctly. I also have doubts whether it will end up in endless redirection loop, port 8080-> 80-> 8080. So please suggest a way to handle this more appropriately.