How to run WSGI-file with Nginx

user228548 asked:

I have a Python-application with a Bottle-webserver running with port 8080. Now i will connect Nginx to the Bottle-webserver with a wsgi-file.

Now, i have a wsgi-file, but how can i execute this with Nginx? Which commands in the Nginx- configuration (default.conf) do i need? Maybe my way of thinking is wrong.
Can someone give me some clarity?

I have this in the Nginx-config:

server {
  location / {
    include uwsgi_params;
    uwsgi_pass 127.0.0.1:8080;
  }
}

For now i see the error (111: Connection refused) while connecting to upstream) in the logs.

Anyone an idea?

My answer:


Your Bottle server is either not running, or listening on a port other than 8080.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.