Dnia poniedziałek, 30 kwietnia 2012 12:01:14 Łukasz Mierzwa pisze:
> Hi,
> 
> I have chrooted rails app (namespace=X)
> I created /robots2.txt file, inside the choroot, and inside rails public
> folder I created symlink robots2.txt -> /robots.txt
> So "curl myapp.com/robots2.txt" should work, but I get 404
> Is this chroot issue with symlinks or I'm missing something?
> I have proper check-static and other options and all files in public folder
> are accessible with curl.
> 
> EDIT1: I sent that from my work email that is not subscribed to this list so
> I'm resending.
> 
> EDIT2: I found in my logs that it's a security feature:
> 
> [uwsgi-fileserve] security error: /robots.txt is not under /home/app/public
> 
> So symlinks pointing to outside of static-check=dir won't work. Can I
> disable it? I can't find any option to do so.

Can I use multiple static-check options in config or should I use static-map is 
such case? When someone keeps static files on shared filesystem(s) (nfs or mfs) 
than being forced to keep static-map in sync with nfs content may be a little 
bit annoying. It would be great feature if I could have:

static-check = /app/public
static-check=/nfs1/app
static-check=/nfs2/app

And when client asks for /static_file.txt than uWSGI would stat for 
static_file.txt in every folder returing this file from first location it was 
found in. Multiple stats may be overhead but uWSGI internal cache could be 
used to keep track where given file is located, if someone use varnish in front 
than it doesn't even matter as each static file would be requested only once in 
a while (until it expires from varnish).

Łukasz Mierzwa
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to