为了测试https,自己发行ssl证书
2016-06-07 16:36:45
1,生成key
openssl genrsa -out httpd.key 2048
2,生crt
openssl req -x509 -sha256 -days 365 -newkey rsa:2048 -key httpd.key -out httpd.crt
3,编辑httpd.conf文件
<VirtualHost 192.168.1.100:443>
ServerName ssl.test.com
DocumentRoot /home/test/www/ssl.test.com/
SSLEngine on
SSLCertificateFile /ssl/httpd.crt
SSLCertificateKeyFile /ssl/httpd.key
</VirtualHost>
===============
-sha256 用来指定生成的证书是sha256,如果不加这个参数,只会生成sha1的证书,在chrome上会报错!