我可以更新配置文件中的 IIS 绑定(bind)吗?我有六台服务器,需要在它们之间同步绑定(bind)。
您有什么想法可以帮助我完成任务吗?谢谢。
最佳答案
您确实可以使用 Web 服务器的 ApplicationHost.config(不是 Web.Config)中的 Bindings/Binding 元素直接设置多个绑定(bind),如下所示,但请确保保持设置站点特定,以便绑定(bind)反射(reflect)特定站点的正确设置:
<site name="Contoso" id="2">
<application path="/" applicationPool="Contoso">
<virtualDirectory path="/" physicalPath="C:\inetpub\wwwroot" />
</application>
<bindings>
<binding protocol="http" bindingInformation="192.168.0.1:443:www.contoso.com" />
<binding protocol="https" bindingInformation="*:443:" />
</bindings>
</site>
更多信息: http://www.iis.net/ConfigReference/system.applicationHost/sites/site/bindings/binding
关于iis - 更新配置文件中的 IIS 绑定(bind),而不是 GUI,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10468245/