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:

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

  1. slf4j提示Class path contains multiple SLF4J bindings

    报错: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding .jar!/org/slf4j/impl/St ...

  2. Class path contains multiple SLF4J bindings

    [logback不同版本jar包] SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:fi ...

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

    1:Hbase启动hbase shell运行命令报Class path contains multiple SLF4J bindings.错误,是因为jar包冲突了,所以对于和hadoop的jar包冲 ...

  4. maven项目启动报错:SLF4J: Class path contains multiple SLF4J bindings.

    SringBoot的Application启动报错: SLF4J: Class path contains multiple SLF4J bindings. SLF4J: Found binding ...

  5. 【maven】排除maven中jar包依赖的解决过程 例子:spring cloud启动zipkin,报错maven依赖jar包冲突 Class path contains multiple SLF4J bindings.

    一直对于maven中解决jar包依赖问题的解决方法纠结不清: 下面这个例子可以说明一个很简单的解决方法: 项目启动报错: Connected to the target VM, address: '1 ...

  6. 日志jar包冲突报错:Class path contains multiple SLF4J bindings

    问题现象:tomcat启动卡死,报错日志如下: 十一月 07, 2017 8:35:45 下午 org.apache.catalina.core.ApplicationContext log 信息: ...

  7. 启动HBase脚本start-hbase.sh时报Class path contains multiple SLF4J bindings.解决方法

    1. 使用start-hbase.sh启动HBase时报Class path contains multiple SLF4J bindings.错误,原因是jar包冲突导致的.所以,对于和Hadoop ...

  8. Hive 遇到 Class path contains multiple SLF4J bindings

    Hive 遇到 Class path contains multiple SLF4J bindings Root Issue; slf4j在两处找到了jar包.分别是在Hadoop和hive的安装目录 ...

  9. spring cloud启动zipkin,报错maven依赖jar包冲突 Class path contains multiple SLF4J bindings

    项目启动报错: Connected to the target VM, address: '127.0.0.1:59412', transport: 'socket' SLF4J: Class pat ...

随机推荐

  1. 嵌套的 ajax 请求

    今天看到了一个嵌套的ajax,算是长见识了. 不过看一眼就知道怎么回事了. 不是不会,就怕想不到. //发送一个ajax请求,嵌套的ajax请求 'ajaxCall': function(url1, ...

  2. Linux下如何确认磁盘是否为SSD

    方法 法1:通过查看/sys/block/sda/queue/rotational 通过cat /sys/block/sda/queue/rotational进行查看,返回值0即为SSD:返回1即为H ...

  3. DAY2-Python学习笔记

    1.迭代器:可以直接作用于for循环的对象统称为可迭代对象:Iterable,使用isinstance()判断一个对象是否是Iterable对象: >>> from collecti ...

  4. Xcode一个project生成多个App

    网上有很多奇奇怪怪的复杂的方案,其实误导了,方法很简单: 打开项目属性 修改Bundle Identifiler 随便生成了四个App,如下所示:

  5. UILabel居中显示的方法

    在IB中拖出一个UIView @IBOutlet weak var myView: UIView! 下面创建的UILabel是在myView中居中显示 方法1: var label = UILabel ...

  6. Monitor WMIExportsToC++Use DiskCleanup bypass UAC

    作者:嘶吼吼链接:https://zhuanlan.zhihu.com/p/23473665来源:知乎著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处. About: Use odb ...

  7. Mysql分页显示

    第一部分:看一下分页的基本原理:   mysql explain SELECT * FROM message ORDER BY id DESC LIMIT 10000, 20************* ...

  8. PHP正则表达式函数学习

    正则表达式是在日常开发中经常用到的,通常一些使用频率过高的正则表达式都是直接粘贴复制,对于基础正则的使用还是要铭记于心的,今天抽时间整理一些php正则表达式的用法. 一.php中常用的正则表达式函数 ...

  9. Activiti工作流的应用示例

    1.新建流程模型 模型管理->模型工作区 点击"创建"后会立即跳转到"流程在线设计器"页面,请参考下一节 2.在线流程设计器 模型管理->模型工作区 ...

  10. JS正则表达式验证手机号和邮箱

    一.验证手机号 function isPoneAvailable(poneInput) { var myreg=/^[1][3,4,5,7,8][0-9]{9}$/; if (!myreg.test( ...