免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1141 | 回复: 0
打印 上一主题 下一主题

debian 下的 apache2 + ssl 配置方法 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-01-13 21:23 |只看该作者 |倒序浏览

由高人[google:debian apache2-[color="#ff0000"]ssl]指点,经过尝试,于昨晚23:58完成,请指正。
debian 下的 apache2 + ssl 配置方法
由高人[google:debian apache2-[color="#ff0000"]ssl]指点,经过尝试,于昨晚23:58完成,请指正。
Apach2 + [color="#ff0000"]ssl Step by Step
-------------------------------------------------
[color="#000000"]daizhong@gmail.com
20041114 23:35
------------------------------------------------
1 apt-get install apache2-mpm-worker
2 cd /etc/apache2/mods-enabled
ln -s /etc/apache2/mods-available/[color="#ff0000"]ssl.* .
3 cd /etc/apache2/sites-available
cp default [color="#ff0000"]ssl
cd /etc/apache2/sites-enabled
ln -s /etc/apache2/sites-available/[color="#ff0000"]ssl .
Then, modify [color="#ff0000"]ssl by the /usr/share/apache2/config/default-443,
paste the follow lines into /etc/apache2/sites-available/[color="#ff0000"]ssl:
SSLEngine on
SSLCertificateFile /etc/apache2/[color="#ff0000"]ssl/apache.pem
#xxx.xxx.com-[color="#ff0000"]ssl.crt
SSLCertificateKeyFile /etc/apache2/[color="#ff0000"]ssl/apache.pem
#xxx.xxx.com-[color="#ff0000"]ssl.key
BrowserMatch "MSIE [1-4]" nokeepalive [color="#ff0000"]ssl-unclean-shutdown
downgrade-1.0 force-response-1.0
BrowserMatch "MSIE [5-9]" [color="#ff0000"]ssl-unclean-shutdown
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
-- If you have several VHOSTS, you can use seperate Sa file as
xxx.xxx.com-[color="#ff0000"]ssl.key, etc
4 modify the 2 files:
/etc/apache2/ports.conf -- append "Listen 443"
/etc/apache2/sites-enabled/[color="#ff0000"]ssl -- the top 2 lines change to:
NameVirtualHost *:443
5 run apache2-[color="#ff0000"]ssl-certification, create the Sa file:
/etc/apache2/[color="#ff0000"]ssl/apache.pem
6 /etc/init.d/apache2 restart
----------------------------------------------------------------------------------------------------------------以下是我配置SSL的简单过程,一些理解可能有错误,如有知道的,请给小弟一个指正。
1.apt-get install apache2。
2.cd /etc/apache2/mods-enabled mods-enabled 已经被include进 apache2.conf,想要添加什么模块,
只需要在mods-availablede/里面的添加相应模块(*.load)和模块的简单配置(*.conf)。
3.ln -s /etc/apache2/mods-available/[color="#ff0000"]ssl.* . 创建SSL的模块和简单配置信息。
4.在sites-available 创建https要访问的信息。为了方便创建我们可以cp default [color="#ff0000"]ssl.然后修改[color="#ff0000"]ssl,
首先要修改[color="#ff0000"]ssl的端口
NameVirtualHost *:443
然后添加SSL的认证信息,这应该是最简单的配置了,详细的,我还没有去仔细了解。
SSLCertificateFile /etc/apache2/[color="#ff0000"]ssl/apache.pem
#xxx.xxx.com-[color="#ff0000"]ssl.crt
SSLCertificateKeyFile /etc/apache2/[color="#ff0000"]ssl/apache.pem
#xxx.xxx.com-[color="#ff0000"]ssl.key
BrowserMatch "MSIE [1-4]" nokeepalive [color="#ff0000"]ssl-unclean-shutdown
#downgrade-1.0 force-response-1.0 //这些不能运行这些命令,所以,我注销了。
#BrowserMatch "MSIE [5-9]" [color="#ff0000"]ssl-unclean-shutdown
#SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP
#-- If you have several VHOSTS, you can use seperate Sa file as
#xxx.xxx.com-[color="#ff0000"]ssl.key, etc
具体的配置情况可以参看/usr/share/apache2/config/default-443.可以根据其修改。里面具体的参数信息,我还没有去了解。知道的兄弟也请告诉一声
5。产生认证文件,由于我们在上面的配置文件中,确定认证文件在/etc/apache2/[color="#ff0000"]ssl/apache.pem,所以,我们去[color="#ff0000"]ssl下面运行apache2-[color="#ff0000"]ssl-
cdrtification.依据提示,产生认证文件。
6. 打开443端口 在port.conf里添加 Listen 443
7.最后,重新启动 apache2ctl restart

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/3188/showart_9944.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP