Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>The only way to get https going is to write the appropriate connector on the <code>server.xml</code> file under the <code>&lt;service&gt;</code> tag. Once you setup the connector you can access all applications in the server with http or https. The only difference is what connector gets used. Typically the connectors for http and https look like these:</p> <pre><code>&lt;Connector port="80" protocol="HTTP/1.1" maxThreads="150" connectionTimeout="20000" redirectPort="443" URIEncoding="UTF-8" compression="on"/&gt; &lt;Connector port="443" protocol="HTTP/1.1" maxThreads="150" connectionTimeout="20000" SSLEnabled="true" scheme="https" secure="true" keystoreFile="conf/.keystore" keystorePass="changeit" clientAuth="false" sslProtocol="TLS" URIEncoding="UTF-8" compression="on"/&gt; </code></pre> <p>You can then force your application to always use https by adding the <code>transport-guarantee</code> tag to <code>web.xml</code> which ends up something like this:</p> <pre><code>&lt;security-constraint&gt; &lt;web-resource-collection&gt; &lt;web-resource-name&gt;Administrators&lt;/web-resource-name&gt; &lt;url-pattern&gt;/*&lt;/url-pattern&gt; &lt;/web-resource-collection&gt; &lt;auth-constraint&gt; &lt;role-name&gt;Administrators&lt;/role-name&gt; &lt;/auth-constraint&gt; &lt;user-data-constraint&gt; &lt;transport-guarantee&gt;CONFIDENTIAL&lt;/transport-guarantee&gt; &lt;/user-data-constraint&gt; &lt;/security-constraint&gt; </code></pre> <p>You can change the <code>transport-guarantee</code> for the different web resources you define. Thus allowing you to protect certain parts of the site and not others.</p> <p>At the very end having the connector in <code>server.xml</code> does not force you yo use https for all applications. It only allows the use of the https connector.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload