title: How to enforce https with tomcat?
body: <p>I have a webapp running on tomcat. Now I want to enforce https. I received 3 files which I saved in tomcat/conf/: localhost-rsa-cert.pem, localhost-rsa-chain.pem and localhost-rsa-key.pem</p>
  
  <p>I changed server.xml so the uncommented connectors look like this and restarted tomcat. I can only access my page with ...com:8080 and not ...com:8443. What is the problem?</p>
  
  <pre><code>&lt;Connector port="8080" protocol="HTTP/1.1"
             connectionTimeout="20000"
             redirectPort="8443" /&gt;
  </code></pre>
  
  <hr>
  
  <pre><code>&lt;Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
             maxThreads="150" SSLEnabled="true" &gt;
      &lt;UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" /&gt;
      &lt;SSLHostConfig&gt;
          &lt;Certificate certificateKeyFile="conf/localhost-rsa-key.pem"
                       certificateFile="conf/localhost-rsa-cert.pem"
                       certificateChainFile="conf/localhost-rsa-chain.pem"
                       type="RSA" /&gt;
      &lt;/SSLHostConfig&gt;
  &lt;/Connector&gt;
  </code></pre>
  
  <p>I read that you need to change something in web.xml too.</p>