Configure Tomcat to use SSL

My first question is - is it possible to use https without using a digital certificate? My second question: I am protecting several pages in my web application. Therefore, the following is added

<security-constraint>
    <web-resource-collection>
        ......
    </web-resource-collection>
    <auth-constraint>
        ......
    </auth-constraint>
    <user-data-constraint>
        <transport-guarantee>CONFIDENTIAL</transport-guarantee>
    </user-data-constraint>
</security-constraint>

I tried running the application, and pages for which ssl is enabled do not load. Therefore, I continued to create the certificate. Added the following to server.xml:

<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
       maxThreads="150" 
       scheme="https" 
       secure="true" 
       keystoreFile="C:\Program Files\apache-tomcat-7.0.11-windows-x86\apache-tomcat-7.0.11\.keystore" 
       keystorePass="johneipe"
       clientAuth="optional" 
       sslProtocol="TLS" />

However, I cannot access these pages and https: // localhost: 8443 .

+5
source share
2 answers

Change your protocol to protocol="org.apache.coyote.http11.Http11Protocol"

This will solve the problem.

+9
source

? , Tomcat JKS, PKCS # 12 ( .p12 .pfx), .
keystoreType = "PKCS12".

<Connector port="1443"
           maxThreads="200"
           enableLookups="false" disableUploadTimeout="true"
           acceptCount="100" debug="0" scheme="https" secure="true"
           clientAuth="false" sslProtocol="TLS" SSLEnabled="true"
           keystoreFile="/opt/companyName/tomcat.keystore"
           keystoreType="PKCS12"
           keystorePass="password"
           ciphers="SSL_RSA_WITH_RC4_128_MD5,SSL_RSA_WITH_RC4_128_SHA,TLS_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_RSA_WITH_AES_128_CBC_SHA,TLS_DHE_DSS_WITH_AES_128_CBC_SHA,SSL_RSA_WITH_3DES_EDE_CBC_SHA,SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA,SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA,TLS_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_RSA_WITH_AES_256_CBC_SHA,TLS_DHE_DSS_WITH_AES_256_CBC_SHA"
           URIEncoding="UTF-8"
       />
+6

All Articles