I have an SSL certificate from GoDaddy that I would like to use with my tomcat installation. Currently it is being used by Apache HTTP server without problems.
The private key is stored in /etc/ssl/private and access is restricted. Apache HTTP server however had no problem serving the correct certificate over SSL.
When I try to point tomcat to the same private key it fails to init the secure protocol because it cannot read the private key. This is the excerpt from my server.xml. I am using APR:
<Connector SSLCertificateFile="/etc/ssl/certs/mysite.crt"
SSLCertificateKeyFile="/etc/ssl/mysite.key"
SSLEnabled="true" maxThreads="150" port="8443"
protocol="HTTP/1.1" scheme="https" secure="true" sslProtocol="TLSv1" />
This generates an error. The Apache HTTP configuration looks like this and works: SSLCertificateFile /etc/ssl/certs/mysite.crt SSLCertificateKeyFile /etc/ssl/private/mysite.key
The permissions for the /etc/private directory were not changed afaik: drwx--x--- 2 root ssl-cert 4096 2011-05-01 11:50 private Inside: -rw-r--r-- 1 root root 1,7K 2011-04-30 11:00 mysite.key
Now my question is: How can I make tomcat make use of the same file? My temporary solution is to copy the key file to a publicly accessible place but I believe this is dangerous right?
Thanks
This generates an error.
- What is the error?