subrequest failover
Maxim Dounin
mdounin at mdounin.ru
Thu Sep 16 17:40:25 MSD 2010
Hello!
On Thu, Sep 16, 2010 at 05:29:21AM -0400, reaper wrote:
> I'm also having strange issue with backup statement. Here's my config
> [code]
> upstream test {
> server 10.0.0.1;
> server 10.0.0.2 backup;
> }
>
> upstream proxy {
> server 94.1.1.1;
> # server 95.1.1.1 backup;
> }
>
> server {
> listen 80;
> server_name _;
>
> access_log off;
>
> location / {
> proxy_pass http://proxy;
> # proxy_pass http://test;
> proxy_set_header Host $host;
> proxy_set_header X-Real-IP $remote_addr;
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
>
> client_max_body_size 100m;
> client_body_buffer_size 128k;
> }
> }
> [/code]
> It shows no errors on nginx -t run but as I uncomment "server 95.1.1.1
> backup;" line it outputs
> [code]
> [emerg]: invalid parameter "backup" in /etc/nginx/sites-enabled/site:8
> configuration file /etc/nginx/nginx.conf test failed
> [/code]
>
>
> No errors in "upstream test" section. Why is that? Tried nginx 0.7.67-3
> and 0.6.32-3 from debian packages.
Most likely you have upstream "proxy" already defined somewhere
before your "upstream proxy" block, e.g. implicitly via
proxy_pass http://proxy;
or something like this.
Maxim Dounin
More information about the nginx
mailing list