# Looking for STEP BY STEP for multiple hostname on single ip

**URL:** <https://forums.suse.com/t/looking-for-step-by-step-for-multiple-hostname-on-single-ip/3591>\
**Category:** Rancher 1.x\
**Created:** [July 31, 2016, 7:47pm UTC](https://forums.suse.com/t/looking-for-step-by-step-for-multiple-hostname-on-single-ip/3591 "2016-07-31T19:47:14Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimmy0017](https://avatars.discourse-cdn.com/v4/letter/j/76d3ee/32.png) [@jimmy0017](https://forums.suse.com/u/jimmy0017)\
**Post date:** [July 31, 2016, 7:47pm UTC](https://forums.suse.com/t/looking-for-step-by-step-for-multiple-hostname-on-single-ip/3591/1 "2016-07-31T19:47:14Z")

</div>

I would like to use rancher/docker with multiple containers with multiple hostname in single ip and single server.

I only have one server and one ip.  
I would like

[abc.hostname.com](http://abc.hostname.com) -\> container 1  
[wp.hostname.com](http://wp.hostname.com) -\> wordpress container with a mysql  
[ror.hostname.com](http://ror.hostname.com) -\> ruby on rails container with a postgresql

etc.  
I really cannot find any tutorial about this. Most docker is use on single ip. Then I tried rancher myself. I can only make first one working. Cannot work with second and third. I used LB too.

---

<div class="post-metadata">

**Author:** ![Thomas\_Hansen](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/thomas_hansen/32/1283_2.png) [@Thomas\_Hansen](https://forums.suse.com/u/Thomas_Hansen)\
**Post date:** [July 31, 2016, 8:58pm UTC](https://forums.suse.com/t/looking-for-step-by-step-for-multiple-hostname-on-single-ip/3591/2 "2016-07-31T20:58:20Z")

</div>

We are using an nginx-proxy container and a letsencrypt companion container to handle this.

With nginx-proxy, you can add environment variables to set the URLs the containers should be available on, e.g.  
VIRTUAL\_HOST=[abc.hostname.com](http://abc.hostname.com)

If you add  
LETSENCRYPT\_HOST=[abc.hostname.com](http://abc.hostname.com)  
LETSENCRYPT\_email=

Then the companion container will go an create SSL certs for you as well.

This works very well - and is a standard setup on any docker host that we create.

Moving forward, we need to work out how to move this up a level though with HA, LB and a single place for all of the SSL certs we are creating.

---

<div class="post-metadata">

**Author:** ![denise](https://avatars.discourse-cdn.com/v4/letter/d/82dd89/32.png) [@denise](https://forums.suse.com/u/denise)\
**Post date:** [July 31, 2016, 8:59pm UTC](https://forums.suse.com/t/looking-for-step-by-step-for-multiple-hostname-on-single-ip/3591/3 "2016-07-31T20:59:12Z")

</div>

Here are the docs on how to set up multiple host name routing rules.

[http://docs.rancher.com/rancher/latest/en/cattle/adding-load-balancers/#request-hostrequest-path](http://docs.rancher.com/rancher/latest/en/cattle/adding-load-balancers/#request-hostrequest-path)

Here’s also a blog post when we first came out with the feature.

> **[Virtual Host Routing for Docker using Rancher Load Balancer | Rancher Labs](http://rancher.com/virtual-host-routing-using-rancher-load-balancer/)**
>
> Hello, I’m Alena Prokharchyk, an engineer at Rancher Labs. In... Read more

---

<div class="post-metadata">

**Author:** ![Thomas\_Hansen](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/thomas_hansen/32/1283_2.png) [@Thomas\_Hansen](https://forums.suse.com/u/Thomas_Hansen)\
**Post date:** [October 12, 2016, 8:54pm UTC](https://forums.suse.com/t/looking-for-step-by-step-for-multiple-hostname-on-single-ip/3591/4 "2016-10-12T20:54:02Z")

</div>

Thanks.

I don’t quite think that will do it.

We have been playing with traefik for a while - and it is _almost_ what we are looking for. But we have run into some limitations that may be show stopping.

What I would _really_ like to see, is for the built-in load balancer in Rancher to be able to dynamically update itself using metadata from rancher when services are started and stopped - exactly like traefik does - but as a native Rancher solution. This should obviously also support multiple SSL certs - and even better with dynamic Letsencrypt support.

I understand new load balancer stuff is coming out with Rancher 1.2. Anyone know what we can expect here?
