Hello!
On Fri, Jul 31, 2009 at 08:00:05PM +0200, Mitchua Mitchua wrote:
> Mitchua Mitchua wrote:
> > Mahiti Support wrote:
> >> Mitchua Mitchua wrote:
> >>> >
> >>> I tried a config like this on 0.8.6 and I found that all requests ended
> >>> up going to the @application proxy, skipping the @varnish proxy
> >>> entirely. Am I doing something wrong?
> >>>
> >>> Here's a sample of my config:
> >>>
> >>>
> >>> location /
> >>> {
> >>> try_files @vanish @origin;
> >>> }
> >>>
> >>> Thanks!
> >>
> >> Hi,
> >>
> >> You seem to have put it as @vanish instead of @varnish.
> >> Is that causing you the issue?
> >>
> >> Vishnu
> >
> > Sorry, bad copy/paste job ;) Those are correct in the config I'm using.
> >
> > Any ideas? Does that look right?
>
> I just tried this and the root document of the website hits the varnish
> servers, but every other request doesn't. Could there be a pathing
> problem going on here?
>
> location /
> {
> try_files $uri $uri/ @origin;
> proxy_pass http://varnishservers;
> proxy_set_header Host $host;
> proxy_connect_timeout 3;
> proxy_next_upstream error timeout;
> }
You try to use try_files, while you have no files. It won't work.
Again: try_files work only with *files*. That's why it's named
try_files.
Use error_page based fallback instead.
Maxim Dounin