Regarding support of server backup parameter

Hi,

I am getting below error while loading nginx configuration file.

2014/08/10 10:06:33 [emerg] 816#0: invalid parameter “backup” in
/etc/nginx/nginx.conf:39

Below is the configuration file :-

upstream backend {
hash $key2 consistent;
server 10.0.0.22:8080;
server 10.0.0.23:8080 max_fails=0;
server 10.0.0.24:8080;
server 10.0.0.25:8080;
server 10.0.0.26:8080 backup;
}

I am using nginx version 1.7.4.

Can anybody help me on this?

Thanks,
Panky

I suspect​ that the “backup” directive is not compatible with the
upstream
hash-based methods, only with the round-robin method. I found this old
post
that explains an alternate method of achieving a backup in this
situation:

http://nginx.2469901.n2.nabble.com/upstream-ip-hash-and-backup-td6534435.html

Cheers,
Nicholas Sherlock