

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
11 messages in ru.sysoev.nginxRe: question about proxy_store| From | Sent On | Attachments |
|---|---|---|
| eliott | Jan 26, 2008 7:18 pm | |
| Cliff Wells | Jan 27, 2008 9:10 pm | |
| eliott | Jan 27, 2008 10:13 pm | |
| Igor Sysoev | Jan 27, 2008 10:21 pm | |
| eliott | Jan 27, 2008 10:31 pm | |
| Igor Sysoev | Jan 27, 2008 10:58 pm | |
| Volodymyr Kostyrko | Jan 28, 2008 12:54 am | |
| Igor Sysoev | Jan 28, 2008 1:36 am | |
| Cliff Wells | Jan 28, 2008 2:11 am | |
| Volodymyr Kostyrko | Jan 28, 2008 2:49 am | |
| eliott | Jan 28, 2008 7:06 pm |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: question about proxy_store | Actions... |
|---|---|---|
| From: | Igor Sysoev (is-G...@public.gmane.org) | |
| Date: | Jan 27, 2008 10:58:38 pm | |
| List: | ru.sysoev.nginx | |
On Sun, Jan 27, 2008 at 10:31:54PM -0800, eliott wrote:
That might work with some tweaking.
My problem is that the upstream cache doesn't have a target for a http://domain.com/foo/index.html request, just the http://domain.com/foo/ (django app with the django url routing)
Then:
location / { root /var/www/data/doman.com/fetch; error_page 404 = /fetch$uri; }
location /fetch/ { internal; include proxy.conf; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://127.0.0.1:9001/; proxy_store /var/www/data/domain.com$uri; proxy_store_access user:rw group:rw all:r; }
location ~ /$ { index index.html; root /var/www/data/doman.com/fetch; error_page 403 404 = @fetch; }
location @fetch { internal; include proxy.conf; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://127.0.0.1:9001; proxy_store /var/www/data/domain.com/fetch${uri}index.html; proxy_store_access user:rw group:rw all:r; }
Maybe I can add another rewrite clause in the /fetch/ location, to strip off an ending index.html before the request hits the proxy.
On 1/27/08, Igor Sysoev <is-G...@public.gmane.org> wrote:
On Sat, Jan 26, 2008 at 07:18:26PM -0800, eliott wrote:
I am having problems with proxy being unable to store pages that do not have a file extension (such as a directory or "nice url").
1. User requests http://domain.com/page/hello/ 2. nginx looks in the root, can not find the page. 3. nginx uses the error page, which then calls a proxy pass inside a location 4. nginx fetches the page. 5. nginx cannot save the results, because it is /page/hello/ nginx does create the /page/hello/ directory inside the proxy_store directory though.
####
It could very well be a problem with my configuration. It works for urls with file extensions.
location ^~ /fetch/ { internal; include proxy.conf; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://127.0.0.1:9001/; proxy_store /var/www/data/domain.com$uri; proxy_store_access user:rw group:rw all:r; }
location / { root /var/www/data/doman.com/fetch; error_page 404 = /fetch$uri; }
You may try
location / { root /var/www/data/doman.com/fetch; set $fetch /fetch$uri; error_page 404 = $fetch; }
location ~ /$ { index index.html; root /var/www/data/doman.com/fetch; set $fetch /fetch${uri}index.html; error_page 403 404 = $fetch; }
location ^~ /fetch/ { internal; include proxy.conf; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://127.0.0.1:9001/; proxy_store /var/www/data/domain.com$fetch; proxy_store_access user:rw group:rw all:r; }
-- Igor Sysoev http://sysoev.ru/en/
-- Igor Sysoev http://sysoev.ru/en/







