1.生成keys
openssl genrsa -out server.key 1024
2.生成crt
openssl req -new -x509 -key server.key -out server.crt
回车后写入相应的资料就做好了server.crt
3.在apache下的conf里建立ssl.key与ssl.crt两个目录,分别把server.key移入ssl.key,server.crt移入ssl.crt
4.配置httpd.conf与ssl.conf
其中ssl.conf里主要的内容为:
Listen 443
DocumentRoot /htdocs
ServerAlias youweb.net
ServerName
ErrorLog logs/logs443-error_log
TransferLog logs/logs443-access_log
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /usr/local/apache/conf/ssl.crt/server.crt
SSLCertificateKeyFile /usr/local/apache/conf/ssl.key/server.key
SSLOptions +StdEnvVars
5.关闭apache后启动,启动时是用startssl启动
阅读(701) | 评论(0) | 转发(0) |