nginx and uploads

13 views
Skip to first unread message

Annet

unread,
May 28, 2016, 1:57:08 PM5/28/16
to web2py-users

I installed Web2py at Webfaction. In Web2py I have an application dbmodel that contains my models,
static files and uploads. I created two static only applications one two serve the content of static and one
to serve the content form uploads.

So any request starting with http://www.domain.com/dbmodel/static/ will be serve files from ~leonexus/webapps/staticonly/
and So any request starting with http://www.domain.com/dbmodel/uploads/ will be serve files from ~leonexus/webapps/imageonly/

The problem is that, when trying to serve http://www.domain.com/dbmodel/static/css/global.css for example, the
nginx will try to serve file ~domain/webapps/staticonly/css/global.css, but the ~domain/webapps/staticonly/
directory is currently empty so a 404 error is being shown.

 At Webfaction they say I will need to copy my files from ~domain/webapps/w2p/web2py/applications/dbmodel/static/ to ~domain/webapps/staticonly/ for nginx to find them.

In case of the static files this is no problem, however, in case of the files in the uploads directory this is not possible. Has anyone solved this issue?


Kind regards,

Annet
Reply all
Reply to author
Forward
0 new messages