总体分两步:一、生成SSL证书;二、设置Apache的SSL配置
1. 安装openssl
yum install mod_ssl openssl
2. 生成自签名的证书
3. 证书放到规范的目录中
4. 修改Apache的SSL配置
Edit the Apache SSL configuration file /etc/httpd/conf.d/ssl.conf.
Change the paths to match where the Keyfile is stored.
Then set the correct path for theCertificate Key File a few lines below.
Quit and save the file.
5. 重启Apache
All being well you should now be ableto connect over https to your server. As the certificate is self signedbrowsers will generally ask you whether you want to accept the certificate.