阅读更多
创建下面3个目录:
C:\Program Files\Apache Group\Apache2\conf\ssl
C:\Program Files\Apache Group\Apache2\conf\ssl.key
C:\Program Files\Apache Group\Apache2\conf\ssl.crt
这里假设apache安装目录是C:\Program Files\Apache Group\Apache2\
下载http://tud.at/programm/openssl.cnf 到 C:\Program Files\Apache Group\Apache2\conf\ssl 目前下
进入命令行,输入下面的命令:
# 注:以下用到的密码都是1234
openssl req -config openssl.cnf -new -out server.csr
Country Name (2 letter code) []:CN
State or Province Name (full name) []:Shanghai
Locality Name (eg, city) []:Shanghai
Organization Name (eg, company) []:Company name
Organizational Unit Name (eg, section) []:IT
Common Name (eg, your websites domain name) []:www.test.com
Email Address []:
[email protected]
Please enter the following 'extra' attributes to be sent with your certificate request A challenge password []:1234
openssl rsa -in privkey.pem -out server.key
openssl x509 -in server.csr -out server.crt -req -signkey server.key -days 365
openssl x509 -in server.crt -out server.der.crt -outform DER
把server.crt移动到C:\Program Files\Apache Group\Apache2\conf\ssl.crt下
把server.key移动到C:\Program Files\Apache Group\Apache2\conf\ssl.key下
C:\Program Files\Apache Group\Apache2\apache.exe -D SSL
cd C:\Program Files\Apache Group\Apache2\bin
Apache.exe -k install
Apache.exe -k config -D SSL
Apache.exe -k start