« 用 Spreadsheet::ParseExcel 处理中文 excel 文件 | Main | 网络通知: 国际光缆坏了 »
December 25, 2006
为 apache 添加 SSL 支持
|
版权声明:可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明。 http://windtear.net/archives/2006/12/25/001174.html http://windtear.net/archives/2006/12/25/001174.html 为 apache 添加 SSL 支持 apache 编译选项增加 --enable-ssl (可选) 修改 openssl.cnf 减少后面制作做成中的输入 /usr/share/ssl/openssl.cnf 制作证书 (原来写过一次 apache 服务器的 CA 证书) openssl req -new -x509 -nodes -days 3650 -out server.crt -keyout server.key openssl req -new -key server.key -out server.csr openssl req -new -key server.key -x509 -days 3650 -out server.crt 修改 httpd.conf LoadModule ssl_module modules/mod_ssl.so AddType application/x-x509-ca-cert .crt AddType application/x-pkcs7-crl .crl SSLRandomSeed startup builtin SSLRandomSeed connect builtin Listen 443 SSLPassPhraseDialog builtin SSLSessionCache dbm:/data/apache/logs/ssl_scache SSLSessionCacheTimeout 300 SSLMutex file:/data/apache/logs/ssl_mutex <VirtualHost _default_:443> SSLEngine on SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL SSLCertificateFile conf/server.crt SSLCertificateKeyFile conf/server.key ServerAdmin windtear@ipcn.org DocumentRoot /var/www/ipcn.org/replace ServerName replace.withyourdomain.com DirectoryIndex index.php index.htm index.html ErrorLog logs/replace.withyourdomain.com-error_log CustomLog logs/replace.withyourdomain.com-access_log combined CustomLog /data/apache/logs/ssl_request_log \ "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" </VirtualHost> 为了把原来的请求都无缝迁移到 https 版本 可以启用 rewrite LoadModule rewrite_module modules/mod_rewrite.so RewriteEngine on RewriteRule ^/$ https://replace.withyourdomain.com/ [NC,R=301,L] RewriteRule ^/(.+)$ https://replace.withyourdomain.com/$1 [NC,R=301,L] |
Posted by windtear at December 25, 2006 11:57 PM
Trackback Pings
TrackBack URL for this entry:
http://cgi.windtear.net/cgi-bin/wt-tb.cgi/1174
Comments
Post a comment
【我爱网络】
2007-12-31 23:51 2007年度 ipcn.org/ipchina.org 总结报告
2007-12-31 00:31 vmware gsx server service
2007-12-31 00:15 squid 对 404 302 缓存的相关问题
2007-12-30 14:24 升级到 MovableType 3.3x 并修改 entry_basename 兼容性
2007-12-30 13:52 [php] realip judge 前面补0的ip格式剔除
2007-12-14 16:34 rm -rf * 系统管理员要排查的定时炸弹
2007-12-13 19:03 山西的宽带运营商太过分了 私自窜改dns解析
2007-12-13 16:35 F5 MIB 再学习 唯一性标记用地址的小bug
2007-12-11 22:15 perl 用Spreadsheet::WriteExcel写了个处理/读写excel的小程序
2007-12-11 13:39 perl 变量转义的问题