Thanks Max, it works now. <br><br>George<br><br><div class="gmail_quote">On Mon, Sep 5, 2011 at 1:17 AM, Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello!<br>
<div><div></div><div class="h5"><br>
On Sun, Sep 04, 2011 at 11:51:31PM +0800, Geoge.Q wrote:<br>
<br>
> Hi All:<br>
><br>
> I met a configuation issue. the configuration is as following:(NGINX is<br>
> V0.7.68) and upstream is enabled when compiled.<br>
> I also test it in V1.0.5, the issue happens again.<br>
><br>
> ----------------------------------------------------------------------------------------------------------------------------------------------<br>
> server {<br>
> listen 80;<br>
> server_name <a href="http://aaa.com" target="_blank">aaa.com</a>;<br>
> server_name 192.168.2.140;<br>
> location / {<br>
> proxy_pass <a href="http://haha" target="_blank">http://haha</a>;<br>
> proxy_redirect off;<br>
> proxy_buffering off;<br>
> proxy_set_header Host $host;<br>
> proxy_set_header X-Real-IP $remote_addr;<br>
> proxy_set_header X-Forwarded-For<br>
> $proxy_add_x_forwarded_for;<br>
> client_max_body_size 1000m;<br>
> client_body_buffer_size 256k;<br>
> proxy_connect_timeout 600;<br>
> proxy_temp_file_write_size 64k;<br>
> }<br>
> }<br>
> upstream haha {<br>
> server 1.1.1.2 max_fails=3 fail_timeout=30s;<br>
> <---------max_fails/fail_timeouts/weight is not support ?<br>
> server 1.1.1.1 weight=10;<br>
> }<br>
> ----------------------------------------------------------------------------------------------------------------------------------------------<br>
><br>
> When I run nginx, the error message print out as following:<br>
> ./nginx<br>
><br>
> Root# /etc/init.d/nginx restart<br>
> [emerg]: invalid parameter "max_fails=3" in<br>
> /var/log/nginx/conf/nginx.conf:19<br>
<br>
</div></div>The problem is that you've tried to define upstream after it was<br>
already implicitly created by proxy_pass directive. Move upstream<br>
definition before it's first use.<br>
<br>
Maxim Dounin<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a></blockquote></div><br>