I had memory problems serving web2py via apache so was advised to change to uwsgi. I run uwsgi with:
How can I configure uwsgi to only serve web2py for certain sub-directories, and the rest as static? For example:
asked 04 Jan '12, 22:31 Baron |
We don't have any experience serving static content on a subpath within uwsgi, however one of the great advantages of our Control Panel is the ability to serve separate applications on a URL subpath. This is what we would recommend for a number of reasons. First, pure static content can be served with a static-only application. This employs the webserver's front-end Nginx server to serve the pure static media (images, video, javascript, css, raw html, etc) without creating any load on your application. So, that's better than any static-media handling by web2py or uwsgi because those "mundane" static requests never have to be handled by your application at all. Second, the control panel supports assigning URL Paths to your website record. This means it is simple and effective to employ a configuration such as:
In the above, the answered 04 Jan '12, 22:45 ryans ♦♦ |
The easiest way would be to forward this traffic directly to the front-end nginx server. You can do that with a 'symbolic link to static only app' and than updating the website configuration to serve that application at the given URI. More info may be found here. answered 04 Jan '12, 22:49 johns |