建立apache的ssl模块
apache加载ssl模块
configure --with-ssl=/usr/lib --enable-ssl
建立服务器及生成证书
mkdir ssl.key
openssl genrsa -des3 1024 > ssl.key/server.key
openssl rsa -in ssl.key/server.key -out ssl.key/server.key
mkdir ssl.csr
openssl req -new -key ssl.key/server.key -out ssl.csr/server.csr
mkdir ssl.crt
openssl x509 -in ssl.csr/server.csr -out ssl.crt/server.crt -req -signkey ssl.key/server.key -days 365
修改conf/extra/httpd-ssl.conf
把SSLCertificateFile "/usr/local/apache2/conf/server.crt"
改为SSLCertificateFile "/usr/local/apache2/conf/ssl.crt/server.crt"
把SSLCertificateKeyFile "/usr/local/apache2/conf/server.key"
改为SSLCertificateKeyFile "/usr/local/apache2/conf/ssl.key/server.key"
修改httpd.conf
把#Include conf/extra/httpd-ssl.conf去掉前面"#"
改为Include conf/extra/httpd-ssl.conf
阅读(1445) | 评论(0) | 转发(0) |