<p>Remove the trailing / from proxy_pass directive.</p>
<div class="gmail_quote">On Nov 20, 2011 3:57 PM, "Nguyen Hai Nam" <<a href="mailto:nam.nh@nd24.net">nam.nh@nd24.net</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Thank you guys for helping.<br>
<br>
I've tried following of Antonio, Edho and Igor's advices but no thing changes.<br>
<br>
@Igor: If I add proxy_redirect <a href="http://a.com:8001/" target="_blank">http://a.com:8001/</a> /; it will return<br>
error 404 Not Found.<br>
<br>
I'm curious in why when I type <a href="http://a.com/something" target="_blank">http://a.com/something</a> it's redirected<br>
to <a href="http://a.com:8001/something" target="_blank">http://a.com:8001/something</a>, so  maybe it's wrong at reverse proxy<br>
point.<br>
<br>
Configuration of reverse proxy as seen:<br>
<br>
http {<br>
<br>
include /usr/nginx/conf/proxy.conf;<br>
<br>
    server {<br>
        listen       8080;<br>
        server_name  <a href="http://abc.com" target="_blank">abc.com</a>;<br>
<br>
 proxy_set_header   Host             $host;<br>
    proxy_set_header   X-Real-IP        $remote_addr;<br>
    proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;<br>
    proxy_max_temp_file_size 0;<br>
}<br>
}<br>
<br>
In proxy.conf<br>
<br>
server {<br>
    listen       80;<br>
    server_name  <a href="http://a.com" target="_blank">a.com</a>;<br>
<br>
    access_log  on;<br>
    error_log on;<br>
<br>
    location / {<br>
        proxy_pass         <a href="http://10.2.176.21:8001/" target="_blank">http://10.2.176.21:8001/</a>;<br>
        #proxy_redirect     off;<br>
        #server_name_in_redirect on;<br>
<br>
        proxy_set_header   Host             $host;<br>
        proxy_set_header   X-Real-IP        $remote_addr;<br>
        proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;<br>
}<br>
}<br>
<br>
Thanks for your help.<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><br>
</blockquote></div>