使用 appcmd 关闭 IIS 7.0 中的 SSL
Appcmd 将按照以下来自 microsoft 的命令行关闭 IIS 7.0 中的 SSL:
appcmd set config " Default Web Site "/section: access /sslFlags:None /commit:APPHOST
我将用我们自己的命令行替换“默认网站”。该命令返回并声明已成功。然而,当查看 IIS Mgr 中的 SSL 设置时,它仍然处于启用状态,并且网页也抱怨安全问题。我可以通过 IIS Mgr 将其关闭,但根据我们的需要,需要在命令行中完成。
我发现更改设置似乎没有任何其他安全问题。我尝试停止该网站,然后应用上面的 appcmd,启动该网站,并出现同样的问题。
有什么建议吗? Windows Server 2007
Appcmd will turn off SSL in IIS 7.0 following this command line from microsoft:
appcmd set config " Default Web Site "/section: access /sslFlags:None /commit:APPHOST
I am replacing "Default Web Site" with our own. The command returns with a statement that it succeeded. However, when looking at the SSL setting in IIS Mgr, it is still enabled, and the web page is also complaining of the security issue. I can turn it off via IIS Mgr, but for our needs, it needs to be done at the command line.
There doesn't seem to be any other security issue regarding changing the setting that I have found. I have tried stopping the site, then applying the appcmd above, starting the site, and same issue.
Any suggestions?
Windows Server 2007
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
需要明确的是,这不会关闭 SSL,只会告诉 IIS 允许客户不使用 SSL 是可以的,但 SSL 端点很可能就在那里。
如果您的目标是完全删除 SSL,那么您还需要从网站中删除指向 443 的绑定,例如:
appcmd.exe set config site /-"[name='YourSite'].bindings.[protocol='https',bindingInformation='*:443:']" /commit:apphost
另外,请注意,这仍然会留下http.sys 中的 SSL 绑定,因此您还需要执行“netsh http del sslcert 'endpoint in here'”
To be clear, that will not turn off SSL, that will just tell IIS that it is ok to allow customers not to use SSL, but the SSL endpoint could very well be there.
If your goal is to remove SSL altogether then you need to also remove the binding from the site that points to 443 something like:
appcmd.exe set config sites /-"[name='YourSite'].bindings.[protocol='https',bindingInformation='*:443:']" /commit:apphost
Also, be aware that this will still leave the SSL binding in http.sys so you will need to do also a "netsh http del sslcert 'endpoint in here' "
你上面的命令(减去它的间距问题)非常适合我。我刚刚在 W7 和 IIS7.5 上尝试过
您是否以管理员身份运行命令提示符?
The command you have above (minus it's spacing problems) works perfectly well for me. i've just tried it on W7 and IIS7.5
Are you running the command prompt as administrator?