Thanks Dounin,<br><br>actually, both 10.10.1.12 and 10.10.1.13 received the POST items with 1.php (so repeat ran the script) ,<br>and why both servers being recorded as Upstream_addr in the log file?<br><br><br><br><div class="gmail_quote">
2011/6/15 Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru">mdounin@mdounin.ru</a>></span><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 Wed, Jun 15, 2011 at 02:38:08PM +0800, MaLi wrote:<br>
<br>
> hi, everyone,<br>
><br>
> nginx version is 0.8.53,<br>
> configure (http definition) is :<br>
> ====================================<br>
> http{<br>
> upstream my_loads {<br>
> server 10.10.1.12;<br>
> server 10.10.1.13;<br>
> }<br>
><br>
> log_format combined_addsvr '$remote_addr - $remote_user [$time_local] '<br>
> '"$request" $status $body_bytes_sent '<br>
> '"$http_referer" "$http_user_agent" $upstream_addr<br>
> $upstream_cache_status ';<br>
> access_log logs/access.log combined_addsvr;<br>
><br>
> server {<br>
> listen 80;<br>
> server_name <a href="http://mytest.com" target="_blank">mytest.com</a>;<br>
> client_max_body_size 100m;<br>
> proxy_buffering off;<br>
> proxy_read_timeout 120;<br>
> proxy_send_timeout 120;<br>
> client_body_timeout 120;<br>
> send_timeout 120;<br>
><br>
> location / {<br>
> proxy_pass <a href="http://my_loads/" target="_blank">http://my_loads/</a>;<br>
> proxy_set_header Host $host;<br>
> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>
> }<br>
> }<br>
> ===========================================<br>
><br>
> there is a strange line in log file: (sorry to use xxx replace of true url)<br>
> 192.168.1.1 - - [14/Jun/2011:20:53:24 +0800] "POST /1.php HTTP/1.1" 200<br>
> 3729558 "<a href="http://mytest.com/xxx" target="_blank">http://mytest.com/xxx</a>" "Mozilla/4.0 (compatible; MSIE 7.0;)"<br>
> <a href="http://10.10.1.12:80" target="_blank">10.10.1.12:80</a>, <a href="http://10.10.1.13:80" target="_blank">10.10.1.13:80</a> -<br>
><br>
> when nginx deals with 1.php, it sends POST to all upstream servers!<br>
><br>
> the next is normal log:<br>
> 192.168.1.1 - - [14/Jun/2011:20:53:44 +0800] "POST /1.php HTTP/1.1" 302 2 "<br>
> <a href="http://mytest.com/xxx" target="_blank">http://mytest.com/xxx</a>" "Mozilla/4.0 (compatible; MSIE 7.0;)" <a href="http://10.10.1.12:80" target="_blank">10.10.1.12:80</a> -<br>
><br>
> Could anyone tell me if it is a bug or just any configure improperly?<br>
> thanks.<br>
<br>
</div></div>nginx will retry request on next upstream server if first one<br>
failed, see here:<br>
<br>
<a href="http://wiki.nginx.org/HttpProxyModule#proxy_next_upstream" target="_blank">http://wiki.nginx.org/HttpProxyModule#proxy_next_upstream</a><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://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br>