But before we open the server, we want to force the usage of HTTPS, so only secure connections are allowed.
Our http port is 9090 and our https port is 8443.
Current situation in the server.xml file is:
<Connector port="9090" URIEncoding="UTF-8" redirectPort="8443" connectionTimeout="20000" protocol="HTTP/1.1"/>
<!-- A "Connector" using the shared thread pool-->
<!--<Connector executor="tomcatThreadPool"port="9090" protocol="HTTP/1.1"connectionTimeout="20000"redirectPort="8443" /> -->
<!-- Define a SSL HTTP/1.1 Connector on port 8443This connector uses the BIO implementation that requires the JSSEstyle configuration. When using the APR/native implementation, theOpenSSL style configuration is required as described in the APR/nativedocumentation -->
<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol" keystorePass="A0zPmlksfd1234879*(" keystoreType="PKCS12" keystoreFile="C:\Program Files\SysAidServer\martens-wildcard.pfx" sslProtocol="TLS" clientAuth="false" secure="true" scheme="https" SSLEnabled="true" maxThreads="150"/>
<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" redirectPort="8443" protocol="AJP/1.3"/>
What should I change to this piece of code so HTTP doesn't work and automatically redirects to https?
Thanks in advance!