I'm having problems because the admin app on my default web2py install references files like
<script src="/admin/static/_2.14.5/js/bootstrap.min.js">
(note the _2.14.5), which don't seem to exist on my site (although static/js/bootstrap.min.js does). I suspect there is some magic redirecting going on when I run the built-in web2py server, because although these links exist on the page, they seem to be redirected. But this doesn't work on my production machine, which uses nginx / uswgi. What am I doing wrong?
This is all explained in the documentation on static asset management.
In particular, the admin app sets the version of its static files to match the installed version of web2py itself -- see https://github.com/web2py/web2py/blob/master/applications/admin/models/0.py#L49.
The documentation provides instructions for configuring your web server properly. For Nginx, use something like:
location ~* /(\w+)/static(?:/_[\d]+.[\d]+.[\d]+)?/(.*)$ {
alias /path/to/web2py/applications/$1/static/$2;
expires max;
}
The Nginx setup script included with web2py already includes the above.