# Dynamic Mass vhosts / reverse proxying

**URL:** <https://www.ruby-forum.com/t/dynamic-mass-vhosts-reverse-proxying/225078>\
**Category:** NGINX\
**Created:** [December 11, 2012, 2:26pm UTC](https://www.ruby-forum.com/t/dynamic-mass-vhosts-reverse-proxying/225078 "2012-12-11T14:26:08Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [December 11, 2012, 2:26pm UTC](https://www.ruby-forum.com/t/dynamic-mass-vhosts-reverse-proxying/225078/1 "2012-12-11T14:26:08Z")

</div>

I’m trying to configure mass (300+) dynamic vhosts and reverse proxying.

users come in at: [https://test.abc.example.com](https://test.abc.example.com) and should be  
transparantly  
proxied to: [http://foo.abc.somethingelse.net](http://foo.abc.somethingelse.net)

Anyone who has this kind of config running ?

- tried regular expressions
- wildcard certificate available

Posted at Nginx Forum:

> **[Dynamic Mass vhosts / reverse proxying](https://forum.nginx.org/read.php?2,233866,233866#msg-233866)**
>
> I'm trying to configure mass (300+) dynamic vhosts and reverse proxying. users come in at: https://test.abc.example.com and should be transparantly proxied to: http://foo.abc.somethingelse.net Anyone who has this kind of config running ? - tried...

---

<div class="post-metadata">

**Author:** ![polleke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/e5b9ba/32.png) [@polleke](https://www.ruby-forum.com/u/polleke)\
**Post date:** [December 11, 2012, 2:31pm UTC](https://www.ruby-forum.com/t/dynamic-mass-vhosts-reverse-proxying/225078/2 "2012-12-11T14:31:24Z")

</div>

> I’m trying to configure mass (300+) dynamic vhosts and reverse proxying.
> 
> users come in at: [https://test.abc.example.com](https://test.abc.example.com) and should be transparantly  
> proxied to: [http://foo.abc.somethingelse.net](http://foo.abc.somethingelse.net)
> 
> Anyone who has this kind of config running ?
> 
> - tried regular expressions
> - wildcard certificate available

Look up the map directive:

> **[Module ngx\_http\_map\_module](http://nginx.org/en/docs/http/ngx_http_map_module.html#map)**
>
> The ngx\_http\_map\_module module creates variables whose values depend on values of other variables.

I think it’s the most suitable thing for your setup.

–appa

---

<div class="post-metadata">

**Author:** ![polleke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/e5b9ba/32.png) [@polleke](https://www.ruby-forum.com/u/polleke)\
**Post date:** [December 11, 2012, 4:00pm UTC](https://www.ruby-forum.com/t/dynamic-mass-vhosts-reverse-proxying/225078/3 "2012-12-11T16:00:12Z")

</div>

Looks like a “not so much used” feature ?

Posted at Nginx Forum:

> **[Re: Dynamic Mass vhosts / reverse proxying](https://forum.nginx.org/read.php?2,233866,233872#msg-233872)**
>
> I'm trying to configure mass (300+) dynamic vhosts and reverse proxying. users come in at: https://test.abc.example.com and should be transparantly proxied to: http://foo.abc.somethingelse.net Anyone who has this kind of config running ? - tried...

---

<div class="post-metadata">

**Author:** ![polleke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/e5b9ba/32.png) [@polleke](https://www.ruby-forum.com/u/polleke)\
**Post date:** [December 11, 2012, 4:21pm UTC](https://www.ruby-forum.com/t/dynamic-mass-vhosts-reverse-proxying/225078/4 "2012-12-11T16:21:15Z")

</div>

> Looks like a “not so much used” feature ?

Why do you say that?

If you go to the russian language list is often talked about and  
even here it has been growing.

It’s the most clean way to implement what you want IMHO.

–appa

---

<div class="post-metadata">

**Author:** ![polleke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/e5b9ba/32.png) [@polleke](https://www.ruby-forum.com/u/polleke)\
**Post date:** [December 11, 2012, 4:14pm UTC](https://www.ruby-forum.com/t/dynamic-mass-vhosts-reverse-proxying/225078/5 "2012-12-11T16:14:49Z")

</div>

On 11 December 2012 14:59, polleke [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Looks like a “not so much used” feature ?

## Please explain why you think that’s the case.

Jonathan M. // Oxford, London, UK

> **[Jonathan Matthews :: Words Typed, Great Rates For Cash](https://www.jpluscplusm.com)**

---

<div class="post-metadata">

**Author:** ![polleke](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/e5b9ba/32.png) [@polleke](https://www.ruby-forum.com/u/polleke)\
**Post date:** [December 11, 2012, 4:34pm UTC](https://www.ruby-forum.com/t/dynamic-mass-vhosts-reverse-proxying/225078/6 "2012-12-11T16:34:41Z")

</div>

11.12.2012, 18:59, “polleke” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) ():

> Looks like a “not so much used” feature ?

Surprisingly but “map” has been initially introduced exactly for mass  
hosting.
