Welcome! Log In Create A New Profile

Advanced

Problems with 301 and cache with proxy reverse.

Posted by mtrujillo 
Problems with 301 and cache with proxy reverse.
May 10, 2010 04:02AM
Hi!

I configured a nginx in proxy-reverse mode with caching. All is running OK. But my problem is for a domain that all of this is conformed with 301 permanent redirect.
For example:

tsj.fry.es has a 301 to http://tsj.fry.es/source/jurisprudencia-tsj-116
contratos.fry.es has a 301 to http://contratos.fry.es/libraries/contratos-5
and so on...

The "problem" is if I start with a clean cache, the redirect runs without problem. But when the cache has certain time acumulated, the redirect doesn't run. I assume because the petition doesn't arrive to the backend servers and is served directly by the nginx proxy, and it's doesn't have this redirect.

I know that I can put a redirect configured into the nginx configuration, but I would like to avoid this (if it is possible). Maybe putting a
proxy_cache_valid 301 1m;
??
I know that if I put this to "0m;" doesn't run in the manner we would like.

Anybody could help me, please? (excuse me my bad english :-/).

Thank you very much.
Re: Problems with 301 and cache with proxy reverse.
May 11, 2010 06:40AM
Sorry, I forgot to mention the squid version: 0.8.34.

Anybody could tell me if this is a bug, feature or something?

I cannot understand why the redirect runs fine with an empty cache, but doesn't work when the reverse-proxy-cache was running for at least 5 or 8 hours.

The scheme is:

[b]apache1 apache2 apache3[/b] (all apaches send the 301 header and have a private IP)



[b]nginx[/b] (reverse proxy with all apaches defined in the "upstream" configuration)
(also the nginx have one public IP and one private IP)

Please, let me know if you have more information about the configuration, etc.

Thank you very much.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 134
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready