To handle static request using "alias" instead of "root" with regexp
should work better
set $web2pyroot <put the dir where you installed web2py>
location ~ ^/(.*)/static/(.*) {
alias $web2pyroot/applications/$1/static/$2;
}
mic
Il 11 aprile 2012 18:23, pbreit <[email protected]> ha scritto:
> Looks like it is having trouble with a file in /static. This is how I serve
> /static:
>
> location /static {
> root /opt/web2py/applications/myapp/;
> }
>
> You may just need to add the appname to:
> root /home/www-data/web2py/applications/
>
> Also, I don't know if you need that extra stuff on the location line.