Welcome! Log In Create A New Profile

Advanced

Re: proxy_store doesn't create directories

Phil Endecott
February 16, 2021 10:50AM
Phil Endecott wrote:
> I have just tried to use proxy_store for the first time and
> it seems to almost work, but it looks like it does not create
> the parent directories for the things that it needs to save.

OK, I've got this working now.

My aim is for a request to http://server.local/remote.com/path/file
to be fetched from http://remote.com/path/file and stored in
/var/cache/nginx/remote.com/path/file.

My config is now:

location /remote.com/ {
root /var/cache/nginx/;
error_page 404 = /fetch$uri;
}
location ~^/fetch/(.*)$ {
internal;
proxy_pass http://$1;
proxy_store on;
proxy_store_access user:rw group:r all:r;
alias /var/cache/nginx/$1;
}

My mistake before was that I omitted the $1 from the alias line.
(Is there a simpler way to do this?)

Thanks Francis for your reply.

Phil.


_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

proxy_store doesn't create directories

Phil Endecott February 15, 2021 04:00PM

Re: proxy_store doesn't create directories

Francis Daly February 15, 2021 05:44PM

Re: proxy_store doesn't create directories

Phil Endecott February 16, 2021 10:50AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

i_d
Guests: 67
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready