<div dir="ltr"><div><div><div>Where I can ask for a help with this configuration?<br><br>I cannot manage to configure it.<br><br></div>My config is as follow:<br>http {<br>    proxy_intercept_errors on;<br><br>    proxy_cache_path /home/toli/nginx/run/cache keys_zone=zone_c1:256m inactive=5d max_size=30g;<br>
   <br>    upstream up_servers {<br>        server <a href="http://127.0.1.1:8081">127.0.1.1:8081</a>;<br>    }<br><br>    server {<br>        listen <a href="http://127.0.0.1:8080">127.0.0.1:8080</a>;<br><br>        location / {<br>
            proxy_cache zone_c1;<br>            proxy_pass <a href="http://127.0.1.1:8081">http://127.0.1.1:8081</a>;<br>            proxy_temp_path tmp ;<br><br>            error_page 301 302 307 @redir;<br>        }<br>
<br>        location @redir {<br>            proxy_cache zone_c1;<br>            proxy_pass $upstream_http_location;<br>            proxy_temp_path tmp ;<br>       }<br>    }<br>}<br><br></div>But I receive 500 internal server error and in the logs I have:<br>
invalid URL prefix in ""<br></div>I think the variable $upstream_http_location is empty. Should I use different variable?<br><br><div><div><br></div><div>Thanks in advance!<br></div></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Oct 2, 2013 at 3:12 PM, Maxim Dounin <span dir="ltr"><<a href="mailto:mdounin@mdounin.ru" target="_blank">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 class="h5"><br>
On Wed, Oct 02, 2013 at 03:03:18PM +0300, Anatoli Marinov wrote:<br>
<br>
> Hello,<br>
> Is there an easy way to configure nginx upstream to follow 302 instead of<br>
> send them to the browser?<br>
<br>
</div></div>The question seems to be off-topic on the nginx-devel@ list.<br>
<br>
The answer is yes, but you'll need to configure it carefully<br>
yourself using the proxy_intercept_errors and error_page 302.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Maxim Dounin<br>
<a href="http://nginx.org/en/donation.html" target="_blank">http://nginx.org/en/donation.html</a><br>
<br>
_______________________________________________<br>
nginx-devel mailing list<br>
<a href="mailto:nginx-devel@nginx.org">nginx-devel@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-devel" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-devel</a><br>
</font></span></blockquote></div><br></div>