Upstream configuration is changed?The keyword (weight/max fail/fail timeout) is not supported?

Hi All:

I met a configuation issue. the configuration is as following:(NGINX is
V0.7.68) and upstream is enabled when compiled.
I also test it in V1.0.5, the issue happens again.


            server {
                    listen 80;
                    server_name aaa.com;
                    server_name 192.168.2.140;
                    location / {
                            proxy_pass http://haha;
                            proxy_redirect off;
                            proxy_buffering off;
                            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 1000m;
client_body_buffer_size 256k;
proxy_connect_timeout 600;
proxy_temp_file_write_size 64k;
}
}
upstream haha {
server 1.1.1.2 max_fails=3 fail_timeout=30s;
<---------max_fails/fail_timeouts/weight is not support ?
server 1.1.1.1 weight=10;
}

When I run nginx, the error message print out as following:
./nginx

Root# /etc/init.d/nginx restart
[emerg]: invalid parameter “max_fails=3” in
/var/log/nginx/conf/nginx.conf:19
~
~
~
~

Hello!

On Sun, Sep 04, 2011 at 11:51:31PM +0800, Geoge.Q wrote:

                    server_name 192.168.2.140;
                            proxy_connect_timeout 600;

When I run nginx, the error message print out as following:
./nginx

Root# /etc/init.d/nginx restart
[emerg]: invalid parameter “max_fails=3” in
/var/log/nginx/conf/nginx.conf:19

The problem is that you’ve tried to define upstream after it was
already implicitly created by proxy_pass directive. Move upstream
definition before it’s first use.

Maxim D.

Thanks Max, it works now.

George