User-Profile-Image
hankin
  • 5
  • 首页
  • Dedecms
  • Notes
  • php
  • Tools
  • Music
  • 分类
    • Tools
    • php
    • Notes
    • Music
    • Dedecms
  • 页面
  • 友链
      请到[后台->主题设置->友情链接]中设置。
Help?

Please contact us on our email for need any support

Support
  • 首页
  • Dedecms
  • Notes
  • php
  • Tools
  • Music
    首页   ›   Notes   ›   正文
Notes

windows Apache https 安全配置

2018-05-09 12:20:33
4376  0 0

windows下Apache比iis配置简单的多,性能也不差。配置了网站的https测试分数也达到了A+,为了安全只能不兼容IE6,这里做一下记录。
vhosts.conf:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<VirtualHost *:80>
    DocumentRoot "D:\htdocs"
    ServerName htdocs
    ServerAlias www.domain.com domain.com
ErrorLog "logs/error/domain.com-error.log"
    #CustomLog "logs/error/domain.com-access.log" common
Header always append X-Frame-Options SAMEORIGIN
RedirectMatch permanent ^/(.*)$ https://domain.com/$1
  <Directory "D:\htdocs">
      Options FollowSymLinks ExecCGI INCLUDES
      AllowOverride All
      Order allow,deny
      Allow from all
      Require all granted
  </Directory>
</VirtualHost>
 
<VirtualHost *:443>
    DocumentRoot "D:\htdocs"
ServerName htdocs
    ServerAlias www.domain.com domain.com
ErrorLog "logs/error/s-domain.com-error.log"
    #CustomLog "logs/error/s-domain.com-access.log" common
Header always set Strict-Transport-Security "max-age=31536000; includeSubdomains; preload"
Header always append X-Frame-Options SAMEORIGIN
<Directory "D:\htdocs">
      Options FollowSymLinks ExecCGI INCLUDES
      AllowOverride All
      Order allow,deny
      Allow from all
      Require all granted
  </Directory>
SSLEngine on
    SSLCertificateFile "D:\Apache\conf\ssl\domain.com\2_domain.com.crt"
    SSLCertificateKeyFile "D:\Apache\conf\ssl\domain.com\3_domain.com.key"
SSLCertificateChainFile "D:\Apache\conf\ssl\domain.com\1_root_bundle.crt"
</VirtualHost>

httpd-ssl.conf:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
Listen 443
SSLPassPhraseDialog  builtin
SSLCipherSuite EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5
SSLHonorCipherOrder     on
SSLCompression          off
SSLSessionTickets       off
#SSLSessionCache         "dbm:/Apache/logs/ssl_scache"
SSLSessionCache        "shmcb:d:/Apache/logs/ssl_scache(512000)"
SSLSessionCacheTimeout  300
 
SSLUseStapling          on
SSLStaplingResponderTimeout 5
SSLStaplingReturnResponderErrors off
SSLStaplingCache        shmcb:d:/Apache/logs/ocsp(128000)

评论 (0)

点击这里取消回复。

欢迎您 游客  

Archives
  • 2019年4月
  • 2018年10月
  • 2018年5月
  • 2018年2月
  • 2016年7月
  • 2015年12月
  • 2014年9月
  • 2014年3月
  • 2014年1月
  • 2013年12月
  • 2013年11月
Categories
  • Dedecms
  • Music
  • Notes
  • php
  • Tools
标签
Dedecms Dedecms短信 Dedecms自定义表单 dedecms自定义表单必填字段 dede_fieldshash showmsg sitemap 织梦 网站地图 自定义表单短信
其他操作
  • 登录
  • 条目feed
  • 评论feed
  • WordPress.org
Copyright © 2025
smarty_hankin 主题. Designed by hankin
主页
页面
博主
Alvin 管理员
14 文章 0 评论 57379 浏览
测试
测试