惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
CERT Recently Published Vulnerability Notes
G
Google Developers Blog
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
宝玉的分享
宝玉的分享
Microsoft Security Blog
Microsoft Security Blog
Jina AI
Jina AI
L
LangChain Blog
博客园_首页
有赞技术团队
有赞技术团队
The Register - Security
The Register - Security
GbyAI
GbyAI
Blog — PlanetScale
Blog — PlanetScale
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
J
Java Code Geeks
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Security Archives - TechRepublic
Security Archives - TechRepublic
量子位
雷峰网
雷峰网
Security Latest
Security Latest
博客园 - 【当耐特】
V2EX - 技术
V2EX - 技术
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 聂微东
IT之家
IT之家
爱范儿
爱范儿
S
Schneier on Security
N
News | PayPal Newsroom
H
Help Net Security
Recent Announcements
Recent Announcements
Martin Fowler
Martin Fowler
N
News and Events Feed by Topic
C
Cyber Attacks, Cyber Crime and Cyber Security
U
Unit 42
博客园 - 司徒正美
Forbes - Security
Forbes - Security
P
Proofpoint News Feed
W
WeLiveSecurity
Cisco Talos Blog
Cisco Talos Blog
小众软件
小众软件
The Cloudflare Blog
AWS News Blog
AWS News Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
P
Palo Alto Networks Blog
Google DeepMind News
Google DeepMind News
H
Heimdal Security Blog
V
Vulnerabilities – Threatpost
Microsoft Azure Blog
Microsoft Azure Blog
T
Tailwind CSS Blog
G
GRAHAM CLULEY

博客园 - SmilingEye

每天5分钟,用碎片时间搞定软考系统架构设计师600词 2025年9月Java后端招聘市场技术风向标:666份招聘数据深度解读 微信小程序PDF签名 DBLock 面试题:ReentrantLock 实现原理 docker 升级(软件包离线方式) 使用fastjson时spring security oauth2获取token格式变化 springboot之cookie操作 使用sed将win换行符转linux与linux换行符转win linux修改权限后git pull出现冲突 JWT简介 jenkins之SSH Publishers连接windows Windows安装OpenSSH服务 jenkins从远程服务器下载 重写mybatis的字符串类型处理器 mybatis-sqlite日期类型对应关系 docker安装postgresql docker常用命令 java sqlite docker,sqlite出错
tomcat设置https
SmilingEye · 2021-01-15 · via 博客园 - SmilingEye

1.环境

tomcat8.5.9

2.JKS 证书格式配置方法1

    <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true"
     maxThreads="150" scheme="https" secure="true"
     keystoreFile="C:\Users\peng\Downloads\cert.jks" 
     keyAlias="gw"
     keystorePass="123456"
     clientAuth="false" sslProtocol="TLS" />

keyAlias 一定要写,不然会有空指针异常

JKS 证书格式配置方法2

    <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol"
               maxThreads="150" SSLEnabled="true" >
        <SSLHostConfig>
            <Certificate 
                certificateKeystoreFile="C:\Users\peng\Downloads\cert.jks"
                certificateKeyAlias="gw"
                certificateKeystorePassword="123456"
                type="RSA" />
        </SSLHostConfig>
    </Connector>

certificateKeyAlias一定要写,不然会有空指针异常

3.PEM(KEY&CRT)证书格式配置方法

    <Connector port="8443" protocol="org.apache.coyote.http11.Http11AprProtocol"
               maxThreads="150" SSLEnabled="true" >
        <UpgradeProtocol className="org.apache.coyote.http2.Http2Protocol" />
        <SSLHostConfig>
            <Certificate certificateKeyFile="F:\key.txt"
                         certificateFile="F:\cert.cer"
                         type="RSA" />
        </SSLHostConfig>
    </Connector>

证书格式转换工具:https://ssl.cfca.com.cn/Web/tool