ericyuan

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

证书转换网站
https://www.sslshopper.com/ssl-converter.html

 

IIS7环境下win导入证书

之前分享过在Linux 服务器下开启 https 的方法,而这次是 IIS,所以也简单分享一下。

①、添加证书管理

IIS 服务器->开始->运行->输入 MMC->确定后弹出如下界面->点击文件->选择添加/删除管理单元:

分享一个SSL证书在线转换工具,以及IIS7环境下开通https的方法

②、下拉左边列表,找到证书并添加:

分享一个SSL证书在线转换工具,以及IIS7环境下开通https的方法

③、选择计算机账户:

分享一个SSL证书在线转换工具,以及IIS7环境下开通https的方法

④、跟着向导继续下一步并完成后,刚刚的 MMC 控制界面就可以看到【证书】选项了,如图点开个人选项,并右键证书,在所有任务里面选择导入:

分享一个SSL证书在线转换工具,以及IIS7环境下开通https的方法

⑤、在弹出的界面的右下角,选择个人信息交换 pfx 格式,并选择刚刚通过在线转换得到的 pfx 证书:

 

分享一个SSL证书在线转换工具,以及IIS7环境下开通https的方法

⑥、后面继续跟着向导操作直到导入成功(导入时需要输入之前设置的证书密码),刷新管理界面看到证书即可。

 

IIS7 https无法绑定主机头,显示灰色

IIS7下面默认HTTPS绑定是无法指定主机头的,但我们可以通过手工修改IIS配置来实现主机头绑定。

打开C:\Windows\system32\inetsrv\config\applicationHost.config

定位到如下位置:

<bindings>
<binding protocol="https" bindingInformation="*:443" />
<binding protocol="net.tcp" bindingInformation="808:*" />
<binding protocol="net.pipe" bindingInformation="*" />
<binding protocol="net.msmq" bindingInformation="localhost" />
<binding protocol="msmq.formatname" bindingInformation="localhost" />
<binding protocol="http" bindingInformation="*:80:www.pianyiSSL.com" /> </bindings>
找到https的配置项目行,修改为:
<binding protocol="https" bindingInformation="*:443:www.www.pianyissl.com" />
注意这里的www.pianyissl.com要换成你自己的域名,之后保存即可。

 

如何解决更新证书、或者创建SSL证书的时候显示“无法生成证书请求,拒绝访问”等提示信息

C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys

就吧这个文件夹的权限设置Administrator(如果你登陆的用户是其他,请填写这个用户名)完全控制即可

 

web不能访问https验证文件

******************************************************************************
The ACME server was probably unable to reach http://linkflys.com/.well-known/acme-challenge/DGz4z_A_VsgO3dilCAB8bkgurpPt

Check in a browser to see if the answer file is being served correctly.

*****************************************************************************

在根目录下加上文件 web.config

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <staticContent>
            <mimeMap fileExtension="." mimeType="text/plain" />
        </staticContent>
    </system.webServer>
</configuration>

 

iis7配置https

下载letsencrypt-win-simple.V1.9.1

letsencrypt.exe --accepttos --manualhost 你的域名 --webroot 你的网站路径(wwwroot路径)

输入是否要指定使用者 (用户),输入 N。( 一旦选择了Y,会让你输入用户名和密码,证书会进行用户认证 )。
参考文档:http://www.cnblogs.com/silin6/p/5931640.html

 

最后,在iis7 站点右击——网站绑定——重新编辑更新SSL证书

posted on 2017-07-05 15:56  ericyuan  阅读(934)  评论(0编辑  收藏  举报