下载附件看看,图解。这里显示不到图片
SSLEngine on
SSLCertificateFile /etc/httpd/.sslkey/server.srt
SSLCertificateKeyFile /etc/httpd/.sslkey/ server.key
mod_ssl
 
mkdir /etc/httpd/conf/.sslkey        创建一个用于存放证书的目录。

 

[root@www .sslkey]# openssl genrsa -out server.key 1024

 

Generating RSA private key, 1024 bit long modulus

 

.........++++++

 

.......................++++++

 

e is 65537 (0x10001)

 

[root@www .sslkey]# openssl req -new -x509 -key server.key -out server.crt

 

You are about to be asked to enter information that will be incorporated

 

into your certificate request.

 

What you are about to enter is what is called a Distinguished Name or a DN.

 

There are quite a few fields but you can leave some blank

 

For some fields there will be a default value,

 

If you enter '.', the field will be left blank.

 

-----

 

Country Name (2 letter code) [GB]:CN 中国

 

State or Province Name (full name) [Berkshire]:guangzhou 广州

 

Locality Name (eg, city) [Newbury]:dongguan 东莞

 

Organization Name (eg, company) [My Company Ltd]:mange 公司名

 

Organizational Unit Name (eg, section) []:mange 单位名

 

Common Name (eg, your name or your server's hostname) []:www.huge.com您的网站名

 

Email Address []:aa@huge.com 邮件地址

 

[root@www .sslkey]# chmod -R 400 /etc/httpd/.sslkey/

 

[root@www .sslkey]# service httpd restart

 

鍋滄 httpd锛�                                               [澶辫触]

 

鍚姩 httpd锛�                                               [纭畾]

 

[root@www .sslkey]# vi /etc/httpd/conf/httpd.conf 

 

[root@www .sslkey]# mkdir /var/v

 

[root@www .sslkey]# cat >>/var/v/i.html

 

aaaaaaaaaaaaaaaaaaaaaa
 
 
 
Linux测试
 
 
Windows测试