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:

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.