If file not found redirect to proxy...

just starting just.starting at gmail.com
Mon Feb 18 13:20:04 MSK 2008


Thanks, that did the job.

On FeThb 18, 2008 2:31 PM, Denis F. Latypoff <denis at gostats.ru> wrote:

> Hello just,
>
> Monday, February 18, 2008, 2:48:29 PM, you wrote:
>
> > hi,
>
> > I am using nginx to serve static files and proxying to jetty for dynamic
> > pages.
>
> > What I generally do is build the .war file, put it on jetty and also put
> the
> > static files on nginx for nginx to serve.
>
> > Now, can I do this, if some static file is not present in nginx, it will
> ask
> > the jetty server for this file?
>
> > I tried to proxy to jetty server if the requested file is not present,
> but
> > it is not allowing me to put the proxy_pass line inside the
> if(filenotfound)
> > block.
>
> > Is there any other way to achieve that.
>
> location / {
>    error_page 404 = @backend;
> }
>
> location @backend {
>    proxy_pass ...;
> }
>
> > Thanks,
> > Rakesh.
>
>
>
> --
> Best regards,
>  Denis                            mailto:denis at gostats.ru
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://nginx.org/pipermail/nginx/attachments/20080218/315ed11b/attachment.html>


More information about the nginx mailing list