# Starting nginx without checking for upstream server availability

**URL:** <https://www.ruby-forum.com/t/starting-nginx-without-checking-for-upstream-server-availability/158477>\
**Category:** NGINX\
**Created:** [January 23, 2009, 7:05pm UTC](https://www.ruby-forum.com/t/starting-nginx-without-checking-for-upstream-server-availability/158477 "2009-01-23T19:05:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Kemp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/258eb7/32.png) [@John\_Kemp](https://www.ruby-forum.com/u/John_Kemp)\
**Post date:** [January 23, 2009, 7:05pm UTC](https://www.ruby-forum.com/t/starting-nginx-without-checking-for-upstream-server-availability/158477/1 "2009-01-23T19:05:38Z")

</div>

Hi,

I am using nginx in a reverse-proxy situation, with several upstream  
servers on different networks.  
I am often testing parts of my server without access to some of the  
upstream servers. When I try to start nginx and even a single upstream  
server is unavailable, I get the message:

> comp:blah johnk$ sudo /usr/local/sbin/nginx  
> 2009/01/23 10:24:22 [emerg] 4894#0: host not found in upstream  
> “xxx.yyy.zzz” in /usr/local/nginx//conf/nginx.conf:18

And nginx is not started.

Although I like configuration checking, I’d also like to be able to  
start nginx even when one or more upstream servers are down. Is there  
a way to do that? I couldn’t see a command-line option to do so, or  
anything that looked relevant in the config file examples on the wiki.

I am using nginx 0.7.30, compiled from source on OS X.

Cheers,

- johnk

---

<div class="post-metadata">

**Author:** ![John\_Kemp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/258eb7/32.png) [@John\_Kemp](https://www.ruby-forum.com/u/John_Kemp)\
**Post date:** [January 23, 2009, 8:25pm UTC](https://www.ruby-forum.com/t/starting-nginx-without-checking-for-upstream-server-availability/158477/2 "2009-01-23T20:25:48Z")

</div>

On Fri, Jan 23, 2009 at 12:56:14PM -0500, John Kemp wrote:

> And nginx is not started.
> 
> Although I like configuration checking, I’d also like to be able to  
> start nginx even when one or more upstream servers are down. Is there  
> a way to do that? I couldn’t see a command-line option to do so, or  
> anything that looked relevant in the config file examples on the wiki.
> 
> I am using nginx 0.7.30, compiled from source on OS X.

One of the way - to use IP addresses.

---

<div class="post-metadata">

**Author:** ![John\_Kemp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/258eb7/32.png) [@John\_Kemp](https://www.ruby-forum.com/u/John_Kemp)\
**Post date:** [January 23, 2009, 9:10pm UTC](https://www.ruby-forum.com/t/starting-nginx-without-checking-for-upstream-server-availability/158477/3 "2009-01-23T21:10:39Z")

</div>

On Jan 23, 2009, at 2:09 PM, Igor S. wrote:

> > > 2009/01/23 10:24:22 [emerg] 4894#0: host not found in upstream  
> > > I am using nginx 0.7.30, compiled from source on OS X.
> 
> One of the way - to use IP addresses.

Is there a way to disable on-startup host lookup altogether (other  
than making a code change)?

- johnk

---

<div class="post-metadata">

**Author:** ![John\_Kemp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/258eb7/32.png) [@John\_Kemp](https://www.ruby-forum.com/u/John_Kemp)\
**Post date:** [January 23, 2009, 9:48pm UTC](https://www.ruby-forum.com/t/starting-nginx-without-checking-for-upstream-server-availability/158477/4 "2009-01-23T21:48:58Z")

</div>

On Fri, Jan 23, 2009 at 02:55:03PM -0500, John Kemp wrote:

> > > wiki.
> > > 
> > > I am using nginx 0.7.30, compiled from source on OS X.
> > 
> > One of the way - to use IP addresses.
> 
> Is there a way to disable on-startup host lookup altogether (other  
> than making a code change)?

There is complex way - using variables in proxy\_pass:

```
   proxy_pass http://host$request_uri;

```

but you can not disable lookups for servers inside upstream blocks.
