Webrole - Multiple hostHeader on a single Binding?
Asked Answered
J

1

5

Is it possible in Azure to have multiple hostHeader on a single Binding or is it mandatory to create one Binding for each hostheader ?

Example :

<Sites>
...
<Site name="sample.com" physicalDirectory="..\sample.com">
<Bindings>
    <Binding name="ep_sample" endpointName="Endpoint1" hostHeader="www.sample1.com,www.sample2.com,www.sample3.com" />
</Bindings>
</Sites>

Or do I have to create each binding entry for single hostHeader (knowing that the site path is the same)?

Joelynn answered 23/6, 2011 at 20:38 Comment(0)
S
9

I believe it has to be done like this:

<Sites>
...
<Site name="sample.com" physicalDirectory="..\sample.com">
<Bindings>
    <Binding name="ep_sample1" endpointName="Endpoint1" hostHeader="www.sample1.com" />
    <Binding name="ep_sample2" endpointName="Endpoint1" hostHeader="www.sample2.com" />
</Bindings>
</Sites>
Seraphim answered 23/6, 2011 at 22:28 Comment(1)
Ok thank you, not a big deal but i was a little lazy about the unique naming of each binding.Joelynn

© 2022 - 2024 — McMap. All rights reserved.