Proxy pass if not found on local

Hello,
Well, the subject says it all. Is it possible ? I tried something like
the following without success. Check the htdocs first, if not found,
look under somedomain.com.
Thanks in advance,

   location / {

        index  index.html index.htm;
        root /foo/bar/htdocs;
        proxy_pass http://somedomain.com/;

}

Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,123879,123879#msg-123879

Hello!

On Thu, Aug 26, 2010 at 07:57:05AM -0400, stingreen wrote:

        root /foo/bar/htdocs;
        proxy_pass http://somedomain.com/;

}

location / {
    index ...
    root ...
    try_files $uri $uri/ @fallback;
}

location @fallback {
    proxy_pass http://somedomain.com;
}

Maxim D.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs