2012-05-11 19 views
6

Para admitir ssl en tomcat .... Realizo un archivo de Keystore. que contiene el certificado autofirmado ..... y luego abrir el archivo server.xml de Tomcat 7.0 y localizar el código de server.xmlProblema en tomcat 7.0 para configurar tomcat para admitir ssl

`  <!-- Define a SSL HTTP/1.1 Connector on port 8443 
    This connector uses the JSSE configuration, when using APR, the 
    connector should be using the OpenSSL style configuration 
    described in the APR documentation --> 

    <!-- <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" 
      maxThreads="150" scheme="https" secure="true" 
      clientAuth="false" sslProtocol="TLS" /> --> ` 

y quite comentario de conector y poner keyStoreFile entrada y keystorePass entrada de código de conector sin comentar como seguir esta .........

` <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" 
     maxThreads="150" scheme="https" secure="true" 
     clientAuth="false" sslProtocol="TLS" **keystoreFile**="d:\cpademo.keystore" 
    **keystorePass**="cpademo"/>  ` 

The above code works in tomcat 6.0...and allow https connection with tomcat but i get the error in tomcat 7.0 log file which indicate that it does not suppoert connection to https 8443 connection. Error in log file is following as..... 

ERROR: 

SEVERE: Failed to initialize end point associated with ProtocolHandler ["http-ap 
r-8443"] 
java.lang.Exception: Connector attribute SSLCertificateFile must be defined when 
using SSL with APR 
    at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:484) 
    at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:554) 

Pls me ayudan a resolver este problema. Gracias por adelantado

+1

Fuera de tema para SO; pertenece a [sf] –

Respuesta

14

Está utilizando el conector APR/nativo con la configuración SSL para los conectores JSSE (BIO y NIO). La solución más simple será comentar el oyente de ciclo de vida de APR en server.xml.

+1

También es posible que necesite usar 'keyPass' en su lugar (o además de)' keystorePass' en Apache Tomcat 7. – Bruno

Cuestiones relacionadas