Ubuntu下为Apache简单配置SSL的方法(HTTPS的实现)
2015-03-16 11:44
771 查看
1. 启用 ssl 模块
2. 安装openssl
3. 创建CA签名(不使用密码去除-des3选项)
4. 创建CSR(Certificate Signing Request)
5. 自己签发证书
6. 复制到相应目录
7. 修改配置文件
8. 重启apache
转自:http://blog.sina.com.cn/s/blog_6ad6243801013em0.html (原文中配置文件目录有错误,我这里修改过了)
博主所有文章已转自私人博客 Joe 的个人博客,谢谢关注!
sudo a2enmod ssl
2. 安装openssl
sudo apt-get install openssl
3. 创建CA签名(不使用密码去除-des3选项)
openssl genrsa -des3 -out server.key 1024
4. 创建CSR(Certificate Signing Request)
openssl req -new -key server.key -out server.csr
5. 自己签发证书
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
6. 复制到相应目录
sudo cp server.crt /etc/ssl/certs sudo cp server.key /etc/ssl/private
7. 修改配置文件
sudo cp /etc/apache2/sites-enabled/000-default /etc/apache2/sites-enabled/001-ssl sudo vim 001-ssl在<VirtualHost *:80>段中,DocumentRoot一行的下方加入内容:
SSLEngine On SSLOptions +StrictRequire SSLCertificateFile /etc/ssl/certs/server.crt SSLCertificateKeyFile /etc/ssl/private/server.key端口修改为:443,即<VirtualHost *:443>(ssl的端口)
8. 重启apache
sudo /etc/init.d/apache2 force-reload sudo /etc/init.d/apache2 restart
转自:http://blog.sina.com.cn/s/blog_6ad6243801013em0.html (原文中配置文件目录有错误,我这里修改过了)
博主所有文章已转自私人博客 Joe 的个人博客,谢谢关注!
相关文章推荐
- Ubuntu下为Apache简单配置SSL的方法(HTTPS的实现)
- Ubuntu下Apache SSL的简洁配置方法(HTTPS的实现)
- Apache+mod_ssl实现https服务的主要配置
- Nginx下配置网站SSL实现https访问本站就是用的这方法
- Nginx下配置网站SSL实现https访问本站就是用的这方法
- Windows平台下Apache SSL/TLS(https)的配置方法
- ubuntu SVN Apache SSL https 安装 与 配置
- Windows环境下配置Apache 2.2.x + SSL ,实现https方式
- windows下apache配置SSL以实现http转换为https
- ubuntu SVN Apache SSL https 安装 与 配置
- apache中使用mod_gnutls模块实现多个SSL站点配置(多个HTTPS协议的虚拟主机)
- apache中使用mod_gnutls模块实现多个SSL站点配置(多个HTTPS协议的虚拟主机)
- 在windows下apache配置SSL以实现http转换为https
- Ubuntu下Apache SSL的配置方法
- Ubuntu Nginx下配置网站ssl实现https访问
- 在Ubuntu上的Apache配置SSL(https证书)的正确姿势
- Ubuntu下配置Apache的 ssl 模块以支持 HTTPS
- Ubuntu Nginx下配置网站ssl实现https访问
- Ubuntu Nginx下配置网站ssl实现https访问
- 让Apache支持shtml实现include文件解析的配置方法