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. 【Java并发编程】之六:Runnable和Thread实现多线程的区别

    Java中实现多线程有两种方法:继承Thread类.实现Runnable接口,在程序开发中只要是多线程,肯定永远以实现Runnable接口为主,因为实现Runnable接口相比继承Thread类有如下 ...

  2. List、Set、Map

    List:1.可以允许重复的对象.  2.可以插入多个null元素. 3.是一个有序容器,保持了每个元素的插入顺序,输出的顺序就是插入的顺序. 4.常用的实现类有 ArrayList.LinkedLi ...

  3. mysql时间函数和时间操作

    补 原文链接:http://blog.csdn.net/yuxiayiji/article/details/7480785 select timediff('23:40:00', ' 18:30:00 ...

  4. Storm入门到精通(四)---本地实例Demo

    单词实时计数 maven项目的结构: 一.Pom.xml [html] view plain copy <project xmlns="http://maven.apache.org/ ...

  5. Android Paging库使用详解

    Android分页包能够更轻易地在RecyclerView里面缓慢且优雅地加载数据. 许多应用从数据源消耗数据, 数据源里面有大量的数据, 但是一次却只展示一小部分. 分页包帮助应用观测和展示大量数据 ...

  6. Linux内核分析实验二:mykernel实验指导(操作系统是如何工作的)

    计算机是如何工作的?(总结)——三个法宝 存储程序计算机工作模型,计算机系统最最基础性的逻辑结构: 函数调用堆栈,高级语言得以运行的基础,只有机器语言和汇编语言的时候堆栈机制对于计算机来说并不那么重要 ...

  7. eclipse 安装 activiti-designer-5.18.0,亲测成功

    转: eclipse 安装 activiti-designer-5.18.0,亲测成功 2018年06月02日 15:50:05 ldw4033 阅读数:2826   版权声明:本文为博主原创文章,未 ...

  8. C/C++:文本查询(单词查询)

    如题: C/C++: Textqurey.h(方便看都在.h里实现了): // // Created by 徐爱东 on 17/7/10. // #ifndef TEXTQUERY_TEXTQUERY ...

  9. Zabbix应用一:Zabbix安装

    1.准备zabbix依赖环境:LNMP 依赖包安装参考http://www.osyunwei.com/archives/10057.html. cmake安装mysql: cmake . -DCMAK ...

  10. python中的zip

    >>> a = zip([1,2,3],[34,35,36]) >>> print(a) <zip object at 0x0394D0F8> > ...