Welcome! Log In Create A New Profile

Advanced

how to make nginx find my assets that are not in my public/?

Patrick Aljord
August 16, 2011 03:24AM
Hi,

So I a rails app that use nginx serving all my assets from my public
directory, but my web app also serves some custom assets directly from
the db. The problem is that nginx tries to look those assets in my
public directory instead of getting them from the app server.
Basically, all the custom assets start with the same path:
"/_files/*". Other assets are served from /images, /stylesheets etc.

Here is my conf: http://pastie.org/private/lrhvnko4hjexx5wbqbr4w

This is the error I get:

2011/08/16 01:42:06 [error] 17826#0: *40 open()
"/home/pat/gitreps/shapado/public/_files/groups/logo/4e48b6f9b002e261db000010.png"
failed (2: No such file or directory), client: 127.0.0.1, server:
localhost.lan, request: "GET
/_files/groups/logo/4e48b6f9b002e261db000010.png HTTP/1.1", host:
"localhost.lan", referrer: "http://localhost.lan/"

Thanks in advance,

Pat

PS: when I use rails with the basic app server the assets are served
fine (as it all goes through rails app server I guess)

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

how to make nginx find my assets that are not in my public/?

Patrick Aljord August 16, 2011 03:24AM

Re: how to make nginx find my assets that are not in my public/?

Maxim Dounin August 16, 2011 04:56AM

Re: how to make nginx find my assets that are not in my public/?

Patrick Aljord August 16, 2011 04:48PM

Re: how to make nginx find my assets that are not in my public/?

Maxim Dounin August 16, 2011 05:14PM

Re: how to make nginx find my assets that are not in my public/?

Patrick Aljord August 16, 2011 05:26PM

Re: how to make nginx find my assets that are not in my public/?

Patrick Aljord August 16, 2011 06:00PM

Re: how to make nginx find my assets that are not in my public/?

Maxim Dounin August 16, 2011 06:06PM

Re: how to make nginx find my assets that are not in my public/?

Patrick Aljord August 16, 2011 06:28PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 151
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready