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.

8
  • Do you have any errors in your logs?
    – NickW
    May 1, 2013 at 13:26
  • no errors in my log file
    – ufk
    May 1, 2013 at 13:38
  • Are the Certificates self signed? Does the browser give any indication that the connection is https?
    – NickW
    May 1, 2013 at 13:42
  • the cert is self signed and the browser doesn't give any indication that it's https
    – ufk
    May 1, 2013 at 13:44
  • 1
    @ETL he's getting https encrypted data passed over http.
    – NickW
    May 1, 2013 at 14:12

1 Answer 1

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.

5
  • Not the port, but the protocol. I'm sure you got the port. May 2, 2013 at 6:07
  • 1
    ooooooooooooooooooooooooooooops
    – ufk
    May 2, 2013 at 6:08
  • ahahahahahahahahahahahahah thank you so much! oh my god i would have spent so many hours on this
    – ufk
    May 2, 2013 at 6:09
  • No problem. It's a really common mistake; I do it a lot too. May 2, 2013 at 6:10
  • you make my week :) thanks again! have a great day!
    – ufk
    May 2, 2013 at 6:11

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .