tomcat開啟https協議

2022-06-11 21:24:09 字數 1469 閱讀 9719

1.在tomcat的conf/server.xml 中配置

2. 將 redirectport 的埠號都指向443

3.在conf/web.xml裡最下面配置

<

security-constraint

><

web-resource-collection

>

<

web-resource-name

>ssl

web-resource-name

>

<

url-pattern

>/*

url-pattern

>

web-resource-collection

>

<

user-data-constraint

>

<

transport-guarantee

>confidential

transport-guarantee

>

user-data-constraint

>

security-constraint

>

4. 重啟tomcat,然後再打瀏覽器裡開啟

zhihu.org.cn  會自動跳轉到    (會顯示404)

開啟 預設應用 /examples/   可看到正常效果

tomcat 配置https協議

2.使用jdk keytool 生成keystore 3.到處相應的cer證書檔案 4.修改 conf server.xml 5.瀏覽器匯入證書 使用命令 keytool genkeypair alias tomcat keyalg rsa keystore e tomcat.keystore 使用...

配置Tomcat使用https協議

這裡測試使用的環境 jdk 1.7 tomcat 8 這裡使用jdk自帶的keytool工具來生成證書 1.在jdk的安裝目錄 bin keytool.exe下開啟keytool.exe 在cmd中進入到該檔案目錄 2.在命令列中輸入以下命令 keytool genkeypair alias tom...

配置Tomcat使用https協議

一.建立tomcat證書 這裡使用jdk自帶的keytool工具來生成證書 1.在jdk的安裝目錄 bin keytool.exe下開啟keytool.exe 2.在命令列中輸入以下命令 二.配置tomcat伺服器 定位到tomcat伺服器的安裝目錄,找到conf下的server.xml檔案 找到如...