# Nginx to listen on two IPs

**URL:** <https://www.ruby-forum.com/t/nginx-to-listen-on-two-ips/225115>\
**Category:** NGINX\
**Created:** [December 14, 2012, 2:48pm UTC](https://www.ruby-forum.com/t/nginx-to-listen-on-two-ips/225115 "2012-12-14T14:48:48Z")\
**Posts on this page:** 3\
**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 14, 2012, 2:48pm UTC](https://www.ruby-forum.com/t/nginx-to-listen-on-two-ips/225115/1 "2012-12-14T14:48:48Z")

</div>

Hello

I have this server with Nginx that have like 4 subdomains and default  
localhost set.  
I also have as econd network card that have an internal IP 192.168.1.2.

How can I define another server that will listen to the private IP only?

Thanks

---

<div class="post-metadata">

**Author:** ![cris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/71e660/32.png) [@cris](https://www.ruby-forum.com/u/cris)\
**Post date:** [December 14, 2012, 2:55pm UTC](https://www.ruby-forum.com/t/nginx-to-listen-on-two-ips/225115/2 "2012-12-14T14:55:13Z")

</div>

> How can I define another server that will listen to the private IP only?

> **[Module ngx\_http\_core\_module](http://nginx.org/en/docs/http/ngx_http_core_module.html#listen)**
>
> This directive appeared in version 1.11.8.

rr

---

<div class="post-metadata">

**Author:** ![cris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/71e660/32.png) [@cris](https://www.ruby-forum.com/u/cris)\
**Post date:** [December 14, 2012, 2:57pm UTC](https://www.ruby-forum.com/t/nginx-to-listen-on-two-ips/225115/3 "2012-12-14T14:57:33Z")

</div>

On 14 December 2012 13:48, Cristian R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hello
> 
> I have this server with Nginx that have like 4 subdomains and default  
> localhost set.  
> I also have as econd network card that have an internal IP 192.168.1.2.
> 
> How can I define another server that will listen to the private IP only?

> **[LMGTFY](https://lmgtfy.com/?q=listen+on+private+ip)**
>
> Let Me Google That For You (LMGTFY): for all those people who find it more convenient to bother you with their question rather than search it for themselves.

## HTH, Jonathan

Jonathan M. // Oxford, London, UK

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