0

I'm trying to configure tomcat to work https port 8443.

using tomcat 7.

I enabled the https connectors with the following parameters:

<Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" keystorePass="<pass>"
           maxThreads="150" scheme="https" secure="true" keystoreFile="${catalina.base}/foo/bar.keystore"
           clientAuth="false" sslProtocol="TLS" />

I created a keystore with the password and the domain required.

when I start tomcat and browse for the admin panel or for my jsp page using port 8443 i get scrumbled unidentified data. which means that i get https encrypted data passed over http. when i browse on port 8080 i see it properly. what am I missing ?

thank you!

kfir

update

I have this configuration in server.xml

  <Listener className="org.apache.catalina.core.AprLifecycleListener" SSLEngine="on" />

and I have this in the log:

May 02, 2013 5:57:45 AM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: /usr/java/package

so maybe this is the problem.

it's just an INFO so I ignored it. but maybe because of missing APR the SSLEngine is not working.

I have gentoo linux and I have the APR package installed I have no idea why it doesn't detect it.

ufk
  • 333
  • 3
  • 8
  • 31

1 Answers1

1

It doesn't look like you have misconfigured anything. However, you may need to explicitly specify the protocol in your URL as well as the port, eg. https://your.server:8443. Most applications (browsers etc.) will infer HTTP if the port isn't 443 and HTTPS isn't specified.

Try also explicitly specifying http:// in the URL in your browser, just to see if it renders. I would be surprised, though; it looks like you've enabled TLS correctly.

The lack of the tomcat native library is not the cause.

Falcon Momot
  • 25,244
  • 15
  • 63
  • 92