How to Move SSL certificate from Apache to Tomcat
https://www.sslsupportdesk.com/how-to-move-ssl-certificate-from-apache-to-tomcat/
Apache uses x509 pem/crt files which is is very different than a Tomcat system that uses keystores. You will follow these steps to copy, convert, and move the working Apache certificate to the Tomcat server.
Both Apache and Tomcat are very customizable. The directory location and naming of the individual files needed vary depending on your personalized system. Below are generalized instructions.
We will start by assuming that you have already successfully installed the SSL certificate on the Apache web server.
Step 1: Finding/converting your SSL certificate and key file on Apache:
- Referencing the httpd.conf or ssl.conf file on the Apache system look for the location and directories of the three files necessary.
- SSLCertificateFile /usr/local/ssl/crt/public.crt
SSLCertificateFile tells Apache how to find the the SSL certificate file. - SSLCertificateKeyFile /usr/local/ssl/private/private.key
SSLCertificateKeyFile tells Apache how to find the private key file. - SSLCertificateChainFile /usr/local/ssl/crt/intermediate.crt
SSLCertificateChainFile or SSLCACertificateFile tells Apache the location of the Intermediate file.
- SSLCertificateFile /usr/local/ssl/crt/public.crt
- Copy the three files located within these directories into one location.
- Using OpenSSL on the Apache system you will perform the following command line conversion.
Note: you will be prompted for a password.openssl
pkcs12 -export -in public.crt -inkey private.key -out mycert.p12 -name
tomcat -CAfile intermediate.crt -caname intermediate -chain - The exported keystore will be ‘mycert.p12‘ and will be ready for you to migrate to the Tomcat server.
Step 2: Configuring SSL in Tomcat with your keystore:
- On the Tomcat server search and open the Tomcat server.xml file.
- Open the server.xml config file using a text editor (ie. JAKARTA_HOME/conf/server.xml)
Search for the secure element in your config file (try searching
for SSL Connector). By default it should look something like this:
- Change the following attributes to reference the location, name, and password of your keystore.
- keystoreFile=”c:\PATH TO mycert.p12”
- keystorePass=”password of mycert.p12”
- Add The following line under KeystorePass=
- keystoreType=”PKCS12″
- Save the changes.
- Stop and Start Tomcat.Your SSL Certificate/Keystore is now installed, and the website is now configured.
Note: PKCS12 keystore type is only supported with Tomcat JDK 1.5.x+
If unsuccessful you will have to
convert your mycert.p12 file to a .jks file by performing the following
command line in Tomcat using keytool.
keytool -importkeystore -srckeystore mycert.p12 -srcstoretype PKCS12 -destkeystore mycert.jks
If this fails and you cannot get
Tomcat to use the Apache converted keystore you will need to generate a
new keystore and CSR from the Tomcat System and reissue your certificate
to be used on the Tomcat system.
Tomcat Support
For more information refer to Tomcat
How to Move SSL certificate from Apache to Tomcat的更多相关文章
- How To Create a SSL Certificate on Apache for CentOS 6
About Self-Signed Certificates 自签证书.一个SSL证书,是加密网站的信息,并创建更安全的链接的一种方式.附加地,证书可以给网站浏览者显示VPS的的身份证明信息.如果一个 ...
- How To Set Up Apache with a Free Signed SSL Certificate on a VPS
Prerequisites Before we get started, here are the web tools you need for this tutorial: Google Chrom ...
- SSL certificate problem unable to get local issuer certificate解决办法
SSL certificate problem unable to get local issuer certificate 解决办法: 下载:ca-bundle.crt 将它放在自己的wamp或者x ...
- Centos 64位 Install certificate on apache 即走https协议
Centos 64位 Install certificate on apache 即走https协议 一: 先要apache 请求ssl证书的csr 一下是步骤: 重要注意事项 An Importan ...
- Failed to connect to VMware Lookup Service……SSL certificate verification failed
今天登陆vsphere web-client时候,报错如下: Failed to connect to VMware Lookup Service https://vc-test.cebbank.co ...
- How to disable SSL certificate checking with Spring RestTemplate?(使用resttemplate访问https时禁用证书检查)
How to disable SSL certificate checking with Spring RestTemplate?(使用resttemplate访问https时禁用证书检查) **** ...
- 使用Letsencrypt做SSL certificate
为什么要使用Letsencrypt做SSL certificate? 最简单直接的原因是免费.但是免费存在是否靠谱的问题,尤其是对安全要求比较高的网站,需要考虑使用letsencrypt的安全性是否符 ...
- Configure custom SSL certificate for RDP on Windows Server 2012 in Remote Administration mode
Q: So the release of Windows Server 2012 has removed a lot of the old Remote Desktop related configu ...
- (转)How to renew your Apple Push Notification Push SSL Certificate
转自:https://blog.serverdensity.com/how-to-renew-your-apple-push-notification-push-ssl-certificate/ It ...
随机推荐
- WebHost failed to process a request.Memory gates checking failed because the free memory (140656640 bytes) is less than 5% of total memory
WebHost failed to process a request. Sender Information: System.ServiceModel.ServiceHostingEnvironme ...
- 【干货】Chrome插件(扩展)开发全攻略(转)
写在前面 我花了将近一个多月的时间断断续续写下这篇博文,并精心写下完整demo,写博客的辛苦大家懂的,所以转载务必保留出处.本文所有涉及到的大部分代码均在这个demo里面:https://github ...
- JavaScript(js)获取本周,本月,本季,本年,上月,上周,上季,去年,上二周,上二月的时间段的代码
function dateChange(name){ var beginTimeObject = document.getElementById("beginTime"); var ...
- 【Python注意事项】如何理解python中间generator functions和yield表情
本篇记录自己的笔记Python的generator functions和yield理解表达式. 1. Generator Functions Python支持的generator functions语 ...
- JDBC 使用这个是MySQL下的
import java.sql.Connection;import java.sql.DriverManager;import java.sql.ResultSet;import java.sql.R ...
- 数据结构 - 只需选择排序(simple selection sort) 详细说明 和 代码(C++)
数据结构 - 只需选择排序(simple selection sort) 本文地址: http://blog.csdn.net/caroline_wendy/article/details/28601 ...
- 【剑指offer】直扑克
个大王,2个小王(一副牌原本是54张^_^)...他随机从中抽出了5张牌,想測測自己的手气,看看能不能抽到顺子,假设抽到的话,他决定去买体育彩票,嘿嘿! ! "红心A,黑桃3,小王,大王,方 ...
- Global Contrast based Salient Region Detection (Ming ming Cheng)
abstract: Automatic estimation of salient object regions across images, without any prior assumption ...
- 我的Spring之旅(二):为请求加入參数
1.前言 在上一篇我的Spring之旅(一)中,我们仅仅是利用不带參数的请求返回一个网页或一段json,在实际的B/S.C/S网络交互中,请求中须要自己定义的參数.本篇将简单地为之前的请求加入參数. ...
- 【转载】使用Docker Hub官方gcc:latest镜像编译C/C++程序以及缩小镜像的方法
摘要:使用Docker Hub官方gcc:latest镜像(1.2GB)编译C/C++程序,以及缩小镜像的方法. 方法1: 在gcc容器里编译C/C++程序 将C/C++代码运行在gcc容器内的最简单 ...