标签:模块 Suite bin load des timeout proc htm shadow
对于网站实现https安全访问,需要做到以下几步:LoadModule ssl_module modules/mod_ssl.so
Listen 443
SSLPassPhraseDialog builtin
SSLSessionCache shmcb:/var/cache/mod_ssl/scache(512000)
SSLSessionCacheTimeout 300
SSLMutex default
SSLRandomSeed startup file:/dev/urandom 256
SSLRandomSeed connect builtin
SSLCryptoDevice builtin
<VirtualHost _default_:443>
ServerName www.自己域名.wang
DocumentRoot /var/www/html/dede
ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
LogLevel warn
SSLEngine on
SSLProtocol all -SSLv2
SSLCipherSuite DEFAULT:!EXP:!SSLv2:!DES:!IDEA:!SEED:+3DES
SSLCertificateFile /etc/ssl/Apache/2_自己证书.crt
SSLCertificateKeyFile /etc/ssl/Apache/3_自己证书.key
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown CustomLog logs/ssl_request_log </VirtualHost>
4、配置httpd主机host。
配置文件:
<VirtualHost *:80>
DocumentRoot /var/www/html/dede
ServerName www.自己域名.wang
ErrorLog logs/自己域名.wang-error_log
CustomLog logs/自己域名.wang-access_log common
# DirectoryIndex index.php index.html
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^自己域名.wang$
RewriteRule ^/(.*)$ https://www.自己域名.wang/$1 [L,R=301]
RewriteCond %{HTTP_HOST} ^www.自己域名.wang$
RewriteRule ^/(.*)$ https://www.自己域名.wang/$1 [L,R=301]
</IfModule>
</VirtualHost>
实现了http跳转https访问。
标签:模块 Suite bin load des timeout proc htm shadow
原文地址:http://blog.51cto.com/zhanx/2153306