Forum

Binding a Virtual Host to a Single IP

Michael David
31 May 2013, 19:46
Hi Folks,

I just configured Hiawatha for my little VPS and it runs my PHP WordPress site well. Excellent

Here is my query.

Let's say I have 3 hosts - example1.com, example2.com and example3.com

and 2 IPS - say 1.2.3.4 and 5.6.7.8

I want example1.com and example3.com to be attached to 1.2.3.4

and example2.com alone to be attached to 5.6.7.8

equivalent to

<VirtualHost 5.6.7.8:80>
ServerName example2.com
ServerAlias www.example2.com
</VirtualHost>

How do I do this? Example config please.

Thanks
Michael
Hugo Leisink
31 May 2013, 20:07
If both are reachable via the internet, just ignore the 'attaching'. Just create three virtual hosts and let DNS do the rest.
Michael David
31 May 2013, 20:10
Thanks Hugo. Let's assume example2.com is an SSL site and needs it own IP.

Then how do I proceed?
Hugo Leisink
31 May 2013, 23:20
Why does it need its own IP? Hiawatha supports Server Name Indication (SNI).
Michael David
1 June 2013, 06:24
Thanks Hugo. Will try that.
This topic has been closed.