这篇文章主要介绍了windows下安装apache及配置ssl的全过程,包括配置ssl的常见问题,需要的朋友可以参考下
LoadModule ssl_module modules/mod_ssl.so
Include conf/extra/httpd-ssl.conf
C:\Program Files\Apache Software Foundation\Apache2.2\bin>openssl genrsa -out server.key 1024
生成一个server.key
C:\Program Files\Apache Software Foundation\Apache2.2\bin>openssl req - new -out server.csr -key server.key -config ..\conf\openssl.cnf
此时生成签署文件 SERVER.CSR
C:\Program Files\Apache Software Foundation\Apache2.2\bin>openssl genrsa -out ca.key 1024
多出CA.key文件
C:\Program Files\Apache Software Foundation\Apache2.2\bin>openssl req - new -x509 -days 365 -key ca.key -out ca.crt -config ..\conf\openssl.cnf
index.txt,newcerts,serial 目录结构如下
demoCA
|--index.txt(文本,内容为空)
|--newcerts(文件夹)
|--serial(文本,内容为 01)
C:\Program Files\Apache Software Foundation\Apache2.2\bin>openssl ca -in server.csr -out server.crt -cert ca.crt -keyfile ca.key -config ..\conf\openssl.cnf
生成 server.crt文件
------------------配置ssl常见问题---------------------
win7系统64位在配置过程中,在重启apache时可能会出现问题
问题1:apache重启失败,报错信息Syntax error on line 62 of C:/Program Files (x86)/Apache Software Foundation/Apache2.2/conf/extra/httpd-ssl.conf:
SSLSessionCache: Invalid argument: size has to be >= 8192 bytes
将conf\extra\httpd-ssl.conf中61-63行修改成下面这样即可 SSLSessionCache "dbm:C:/Program Files (x86)/Apache Software Foundation/Apache2.2/logs/ssl_scache"
# SSLSessionCache "shmcb:C:/Program Files (x86)/Apache Software Foundation/Apache2.2/logs/ssl_scache(512000)"
SSLSessionCacheTimeout 300
原文链接:https://www.jb51.net/os/windows/154740.html
快乐像涟漪一样在心中轻轻荡漾,开怀大笑,喜地欢天,嬉皮笑 脸。