lamper571 发表于 2013-1-27 05:08:48

Apache HTTPS配置

创建下面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 []:webmaster@test.com

Please enter the following 'extra' attributes to be sent with your certificate requestA 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
页: [1]
查看完整版本: Apache HTTPS配置