如何从命令提示符向 IIS7 站点分配 SSL 证书 [英] How to assign a SSL Certificate to IIS7 Site from Command Prompt
本文介绍了如何从命令提示符向 IIS7 站点分配 SSL 证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您能否告诉我是否可以使用 APPCMD 应用程序为 IIS7 中的网站分配 SSL 证书?
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%system32inetsrvAppcmd
但似乎找不到任何方法将站点映射到证书(例如证书哈希)
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屋!
查看全文