Tomcat Https配置
来源:互联网 发布:重庆seo网站诊断 编辑:程序博客网 时间:2024/04/30 23:26
1、生成keystore
keytool -genkey -alias testssl.nb.com -keyalg RSA -keystore /data/zs/niubiyuming.keystore
2、导出证书 (可以直接用第三方证书)
keytool -export -file /data/zs/niubiyuming.crt -alias testssl.nb.com -keystore /data/zs/niubiyuming.keystore
3、把keystore转换为pkcs12格式
keytool -importkeystore -srckeystore /data/zs/niubiyuming.keystore -destkeystore /data/zs/niubiyuming.p12 -deststoretype PKCS12
4、使用openssl工具导出私钥
openssl pkcs12 -in /data/zs/niubiyuming.p12 -out /data/zs/niubiyuming.pem -nodes
5、Tomcat配置
安装:SSL模块
yum install mod_ssl -y 安装:SSL模块
<Connector port="80" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="443" />
<Connector port="443" maxHttpHeaderSize="8192"
maxThreads="150"
enableLookups="false" disableUploadTimeout="true"
acceptCount="100" scheme="https" secure="true"
SSLEnabled="true"
SSLCertificateFile="/data/zs/niubiyuming.crt"
SSLCertificateKeyFile="/data/zs/niubiyuming.pem" />
6、访问测试
https://testssl.nb.com/
http://testssl.nb.com/
7、证书相关信息
Country Name (2 letter code) [XX]:CN #国家地区
State or Province Name (full name) []:zhejiang #城市
Locality Name (eg, city) [Default City]:hangzhou #当地名称
Organization Name (eg, company) [Default Company Ltd]: niubiyuming #组织名称
Organizational Unit Name (eg, section) []:IT #组织部门名称
Common Name (eg, your name or your server's hostname) []:testssl.nb.com #通用名称(例如,您的姓名或您的服务器的主机名),随便写
Email Address []:1111111@qq.com #邮箱
Please enter the following 'extra' attributes
to be sent with your certificate request #添加一个“额外”的属性,让客户端发送CA证书,请求文件时,要输入的密
A challenge password []: #直接加车
An optional company name []:#直接加车
Using configuration from /etc/pki/tls/openssl.cnf #CA服务器的配置文件。上面修改的内容会添加到这个配置文件中
Enter pass phrase for /etc/pki/CA/private/./cakey.pem: 123456 #输入刚才保护CA密钥的密码
0 0
- tomcat实现https配置
- tomcat配置Https
- tomcat https 配置过程
- tomcat配置https
- Tomcat配置Https (SSL)
- Tomcat下配置HTTPS
- tomcat配置 https
- Tomcat配置Https访问
- Tomcat 配置https
- tomcat https 配置过程
- 给Tomcat配置HTTPS
- Tomcat下配置HTTPS
- cas--tomcat https配置
- Tomcat 配置 https 协议
- Tomcat配置https
- 本地tomcat 配置https
- 配置tomcat https
- tomcat配置https详述
- NOIP2012国王游戏
- [QT]QT的安装和初体验
- 【文智背后的奥秘】系列篇——海量数据抓取
- 大家
- httpurlconnection访问网络上的数据
- Tomcat Https配置
- ORB_SLAM2安装与运行
- 原创
- web.xml文件的作用
- Ubuntu 16.04.1 Server 64bit 系统安装后的网络配置(Vmware Workstation 12.5 & Windows 10 X64 环境)
- c++初始化构造、初始化调用
- RabbitMQ进程结构分析与性能调优
- 【xunSearch】C++ 搜索引擎xunSearch的配置、安装
- 高冷