如何从命令提示符为IIS7站点分配SSL证书 [英] How to assign a SSL Certificate to IIS7 Site from Command Prompt

查看:233
本文介绍了如何从命令提示符为IIS7站点分配SSL证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您能告诉我是否可以使用APPCMD应用程序将SSL证书分配给IIS7中的网站?

Can you advise me whether it is possible or not to assign a SSL Certificate to a website in IIS7 using the APPCMD application?

我熟悉命令设置HTTPS绑定

I am familiar with the command to set the HTTPS Binding

appcmd set site /site.name:"A Site" /+bindings.[protocol='https',bindingInformation='*:443:www.mysite.com']

以及如何获取当前映射

%windir%\system32\inetsrv\Appcmd

但似乎找不到任何方法将网站映射到证书(例如证书哈希)

but can not seem to find any way to map a site to a certificate (say the certificates hash for example)

推荐答案

答案是使用NETSH。
例如

The answer is to use NETSH. For example

netsh http add sslcert ipport=0.0.0.0:443 certhash='baf9926b466e8565217b5e6287c97973dcd54874' appid='{ab3c58f7-8316-42e3-bc6e-771d4ce4b201}'

这篇关于如何从命令提示符为IIS7站点分配SSL证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆