日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

tomcat通过apr配置https

發布時間:2025/6/15 编程问答 54 豆豆
生活随笔 收集整理的這篇文章主要介紹了 tomcat通过apr配置https 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

為什么80%的碼農都做不了架構師?>>> ??

實現目的

tomcat的加密分兩種情況,一種為使用Java runtime(非APR),一種為OpenSSL library (through APR/Tomcat-Native). 本文為配置實現APR方式的https。

下載安裝所需軟件

  • 安裝apr
    • 下載安裝所需軟件
    wget http://mirror.bit.edu.cn/apache//apr/apr-1.5.2.tar.gz wget http://mirror.bit.edu.cn/apache//apr/apr-iconv-1.2.1.tar.gz wget http://mirror.bit.edu.cn/apache//apr/apr-util-1.5.4.tar.gz
    • 安裝apr
    tar zxf apr-1.5.2.tar.gz cd apr-1.5.2 ./configure --prefix=/usr/local/apr make make install cd ..
    • 安裝apr-iconv
    tar -zxvf apr-iconv-1.2.1.tar.gz cd apr-iconv-1.2.1 ./configure --prefix=/usr/local/apr-iconv --with-apr=/usr/local/apr make make install cd ..
    • 安裝apr-util
    tar zxvf apr-util-1.5.4.tar.gz cd apr-util-1.5.4 ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr --with-apr-iconv=/usr/local/apr-iconv/bin/apriconv make make install cd ..
  • 安裝native
  • wget http://archive.apache.org/dist/tomcat/tomcat-connectors/native/1.1.32/source/tomcat-native-1.1.32-src.tar.gztar zxvf tomcat-native-1.1.32-src.tar.gz cd tomcat-native-1.1.32-src/jni/native ./configure --with-apr=/usr/local/apr --with-ssl=yes make make install
  • 系統配置
    • 配置環境變量
    vi /etc/profile # 添加環境變量 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/apr/lib # 使環境變量生效 source /etc/profile
    • 配置動態鏈接庫
    echo "/usr/local/apr/lib">/etc/ld.so.conf.d/apr.conf # 查看 ldconfig –v
  • tomcat配置
  • # 修改tomcat的server.xml文件的https配置模塊,端口及證書路徑按需修改 <Connector protocol="org.apache.coyote.http11.Http11AprProtocol"port="8443"enableLookups="true" disableUploadTimeout="true"acceptCount="1000" maxThreads="1500"scheme="https" secure="true" SSLEnabled="true"SSLCertificateFile="${CATALINA_HOME}/ssl-key/server.crt"SSLCertificateKeyFile="${CATALINA_HOME}/ssl-key/server.key"sslProtocol="TLS"/>
  • 所需密鑰 (haierubic.crt \ haierubic.key \ haierubicCA.csr)
  • 轉載于:https://my.oschina.net/ibobby/blog/760982

    總結

    以上是生活随笔為你收集整理的tomcat通过apr配置https的全部內容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。