Re: [web2py] How to mimic routes.py with nginx

2015-02-03 Thread Michele Comitini
Where's the /AAA location directive? If you want to cache you can try the uwsgi directives : http://nginx.org/en/docs/http/ngx_http_uwsgi_module.html#uwsgi_cache The rest seems ok. 2015-02-03 13:22 GMT+01:00 al ex : > I have commented the following 4 directives in my server declaration, that > no

Re: [web2py] How to mimic routes.py with nginx

2015-02-03 Thread al ex
I have commented the following 4 directives in my server declaration, that now looks like as below, and it seems to work better. open_file_cache max=1000 inactive=20s; open_file_cache_valid30s; open_file_cache_min_uses 2; open_file_cache_errors on; -

Re: [web2py] How to mimic routes.py with nginx

2015-02-02 Thread Michele Comitini
Il giorno lunedì 2 febbraio 2015 12:29:00 UTC+1, alex ha scritto: > > Michele, > > Thank you for quick answer! > > If I put in nginx server directive: > > location ~ ^/AAA(/.*)?$ { rewrite ^.*$ http://example.com/app/ctr/fnc > break ; } > > and leave web2py/applications/app/routes.py with onl

Re: [web2py] How to mimic routes.py with nginx

2015-02-02 Thread al ex
Michele, Thank you for quick answer! If I put in nginx server directive: location ~ ^/AAA(/.*)?$ { rewrite ^.*$ http://example.com/app/ctr/fnc break ; } and leave web2py/applications/app/routes.py with only routes_out = ( ('/app/ctr/fnc', r'/AAA'), ) everytime I call /AAA it gets rewritte

Re: [web2py] How to mimic routes.py with nginx

2015-02-02 Thread Michele Comitini
you still need your routes.py in place: routes_out = ( ('/app/ctr/fnc', r'/AAA'), ) 2015-02-02 11:23 GMT+01:00 al ex : > I have setup this route in /web2py/applications/app > > routes_in = ( > (r'/AAA/?', '/app/ctr/fnc'), > ) > > routes_out = ( > ('/app/ctr/fnc', r'/AAA'), > > ) >