4 messages in ru.sysoev.nginxRe: Starting nginx without checking f...
FromSent OnAttachments
John KempJan 23, 2009 9:55 am 
Igor SysoevJan 23, 2009 11:08 am 
John KempJan 23, 2009 11:54 am 
Igor SysoevJan 23, 2009 12:37 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: Starting nginx without checking for upstream server availabilityActions...
From:Igor Sysoev (is@rambler-co.ru)
Date:Jan 23, 2009 12:37:14 pm
List:ru.sysoev.nginx

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

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

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

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.

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.