On Sun, Jan 19, 2014 at 1:59 AM, Roberto De Ioris <[email protected]> wrote:

> [snip]
>
> nope, you can have as many as you need/want
>
> the error means some misconfiguration in the nginx side, can you post its
> config ?
>

Here it is, below, but after thinking about the problem further, I've
decided to do the routing internally in my python code, using the env
values passed to the application handler function (i.e., REQUEST_URI,
REQUEST_METHOD, PATH_INFO, etc.).

Among other things, I have more control of the regexes which determine the
routes, and so I'm comfortable doing it this way instead.

I'm also new to using nginx, though, so if you have comments on this,
please let me know:

server {
  listen   80;
  listen   [::]:80 default_server ipv6only=on; ## listen for ipv6
  #server_name  localhost;
  root   /opt/myproject/html/;

  location / {
    index  index.html;
    try_files $uri $uri/ @uwsgi;
  }

  location @uwsgi {
    include uwsgi_params;
    uwsgi_pass localhost:9090;
  }

}

your usage is pretty "ortodox", but take in account each app is loaded in
> a new python interpreter. This is good if you want apps with
> almost-isolated state, but if you want them to share state just add
> single-interpreter = true
>
> the doc repository is github.com/unbit/uwsgi-docs
>

It only seemed unorthodox in that everything in the docs for python seemed
to assume a web framework. I can add a tutorial or example for the specific
use case I was interested in, and send you a pull request.

Thanks again for replying so quickly.
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to