Multiple HTTPS Bindings IIS 7 Using appcmd

http://toastergremlin.com/?p=308

Sometimes when using a wildcard SSL or Unified Communications Certificate (UCC) it is necessary to add multiple https host headers for a single IP. Unfortunately the IIS 7 GUI does not allow you to set a host header on a https binding however this can be achieved using the “appcmd” command.

1. First bind the certificate to one site as normal by adding the https binding through the IIS GUI.

2. Open a command prompt and navigate to C:\Windows\System32\Inetsrv\ using the command below:

cd C:\Windows\System32\Inetsrv\

3. Enter the following command to manually set the binding bearing in mind the notes below:

appcmd set site /site.name:"SiteNameInIIS" /+bindings.[protocol=‘https‘,bindingInformation=‘IP.Add.re.ss:443:www.example.com‘]

Make sure to change the following values on the command above accordingly:

SiteNameInIIS: The site name exactly how it appears in IIS. For instance “example.com”.

IP.Add.re.ss: The IP used by the site.

www.example.com: The desired hostname. Note in most cases there will be one for www and non-www.

Example command:

appcmd set site /site.name:"example.com" /+bindings.[protocol=‘https‘,bindingInformation=‘1.2.3.4:443:www.example.com‘]

Running the appcmd command from a batch file:

To make this process easier you can use the batch file below. This will prompt you for the site name, IP, and host header value and then make the appropriate host header change.

Save the code as something like “addsslbinding.bat” and then call it from a command prompt by entering the name of the file (ie. “addsslbinding”).


@echo off
echo Enter site name in IIS:
set /p SiteName=
echo Enter IP address:
set /p IP=
echo Enter host header value (ie. www.domain.com):
set /p HostHeader=
C:\Windows\System32\Inetsrv\appcmd set site /site.name:"%SiteName%" /+bindings.[protocol=‘https‘,bindingInformation=‘%IP%:443:%HostHeader%‘]

Example:

时间: 2024-10-10 03:38:15

Multiple HTTPS Bindings IIS 7 Using appcmd的相关文章

Hbase启动hbase shell运行命令报Class path contains multiple SLF4J bindings.错误

1:Hbase启动hbase shell运行命令报Class path contains multiple SLF4J bindings.错误,是因为jar包冲突了,所以对于和hadoop的jar包冲突的,可以将其他jar包删除,如果你不确定是否删除正确,可以将其他的jar包复制备份或者修改名称,确保操作以后失败了,还可以找回. SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:fil

Maven中日志jar包冲突报错:Class path contains multiple SLF4J bindings

错误表现: SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/D:/learn/Java/maven/repository_taotao/org/slf4j/slf4j-log4j12/1.6.4/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: Found binding in [

SLF4J: Class path contains multiple SLF4J bindings.警告解决

SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding in [jar:file:/G:/repo/repo-mvn-qingmu/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar!/org/slf4j/impl/StaticLoggerBinder.class] SLF4J: Found binding in [jar:file:

Class path contains multiple SLF4J bindings

[logback不同版本jar包] SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/H:/Workspaces/VgopSSO/WebRoot/WEB-INF/lib/logback-classic-1.0.13.jar!/org/slf4j/impl/StaticLoggerBinder.class]SLF4J: Found binding in [jar:file:/H

hbase0.98.7使用遇到 Class path contains multiple SLF4J bindings.错误解决方案

hbase使用遇到 Class path contains multiple SLF4J bindings.错误解决方案 转载自:http://www.aboutyun.com/thread-7737-1-1.html 错误表现:SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/usr/hbase/lib/slf4j-log4j12-1.6.4.jar!/org/slf4j/

spark 与 Hadoop 融合后启动 slf4j提示Class path contains multiple SLF4J bindings

相关参考文献: https://www.oschina.net/question/93435_174549 警告信息如下: 看起来明明就是一个文件,怎么还提示multiple bindings呢,slf4j这货一直没用明白,求解 其它参考文献: http://www.slf4j.org/news.html August 19th, 2011 - Release of SLF4J 1.6.2 本文解决方法: find ./ -name "slf4j*" 分别找出 hadoop 和 spa

IIS下使用appcmd批量搭建网站

使用 cmd 运行如下命令 > %windir%\system32\inetsrv\appcmd list site /config /xml > d:\sites.xml 修改 d 盘 下的 sites.xml 文件 包括批量新增的网站项目 在 cmd 中 使用如下命令导入 > %windir%\system32\inetsrv\appcmd add site /in < d:\sites.xml 在 cmd 中 使用 如下命令重启IIS > iisreset 刷新你的 i

SLF4J: Class path contains multiple SLF4J bindings.

库冲突导致的异常,由于多次引入SLF4j包导致. It seems you have several implementation of SLF4J; you should exclude all the not necessary ones maven项目的解决方法: 通过mvn dependency:tree命令,确定那些库使用了SLF4j,然后选择一个,其他的使用exclusions排除. 最后发现是slf4j-simple 与slf4j冲突.

使用appcmd命令创建iis站点及应用程序池

参考文章:iis7 appcmd的基础命令及简单用法 验证环境:Windows 7    IIS7 AppCmd.exe工具所在目录 C:\windows\sytstem32\inetsrv\目录下,所以执行命令前,先把当前目录切换到该目录下: cd C:\Windows\System32\inetsrv 创建iis站点: appcmd add site /name:"MyTestSite1" /bindings:http/*:8990: /physicalPath:"E:\