On 5 Aug 2012, at 4:42 PM, Athelionas <[email protected]> wrote:
> Hi,
>
> I'm trying to setup Nginx to handle all my static contents bypassing uwsgi
> and thus web2py. Everything works fine as long as I don't specify a language
> in the URL. If I do then I end up with broken links to static files. Also, I
> don't quite understand what map_static should do but from what I could gather
> I guess it should be turned off so it won't mess with outgoing URLs of static
> contents. By the way routing seems to operate as it should apart from
> map_static which I don't understand so I guess there's something wrong with
> my nginx configuration file (probably the first location block).
What's an example of a URL that works vs one that doesn't?
>
> Here are my config files:
>
> routes.py
>
> # -*- coding: utf-8 -*-
>
> routers = dict(
> # base router
> BASE = dict(
> applications = ['myapp'],
> domains = {
> 'mydomain' : 'myapp'
> },
> default_application = 'myapp',
> default_controller = 'default',
> default_function = 'index',
> languages = ['en', 'hu'],
> default_language = None,
> map_static = False
> )
> )
>
> logging = 'debug'
>
>
> nginx config
>
> server
> {
> listen 80;
> server_name mydomain;
> server_tokens off;
> access_log off;
> location ~* /(\w+)/static/
> {
> root /home/www-data/web2py/applications/;
> }
> location /
> {
> uwsgi_pass unix:///tmp/uwsgi.socket;
> include uwsgi_params;
> }
> }
>
>
> --
>
>
>
--