I have two web applications running under tomcat 7.0
- https:// secure.example.com:8443
- http:// insecure.example.com:8080
They have two separate "host" records in server.xml (different domains, separate locations).
I need first one to be available via HTTPS only. In other words I need insecure requests to secure application to be redirected to secure port. But insecure application still must be available via HTTP.I need first one to be available via HTTPS only. In other words I need insecure requests to secure application to be redirected to secure port. But insecure application still must be available via HTTP.
- http:// insecure.example.com:8080 - OK
- https:// secure.example.com:8443 - OK
- http:// secure.example.com:8080 --> https:// secure.example.com:8443
I know it is possible to specify "redirectPort" in insecure Connector (server.xml) but then HTTP requests to any of the applications(domains) will be redirected to secure port.
Is it possible to configure that with single tomcat instance?