I am trying to host a website on Centos + tomcat7 , if I run tomcat7 on port 80 everything works fine i.e. 188.8.131.52 but if I want to access it using https://184.108.40.206/ ,it doesn't work , but If I try like this https://220.127.116.11:8443/ after adding the keystore , then it works fine.
So, I need a way to run tomcat on 80 and https , i.e. https://18.104.22.168/ should work fine on port 80.
Now,I am trying only with Tomcat but if it's totally not possible then I can use some Apache http server to redirect to tomcat using AJP connectors but that is the last thing I would prefer to do .
Also, can we do something with the IPTables?
You need to change the Connector port for https from the default value of "8443" to "443" in server.xml
The default looks something like this:
<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" />
See SSL/TLS Configuration HOW-TO from the Tomcat docs on how to setup SSL