0

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?

  • This is NOT off-topic, this is just question about servers, and not about other things like cows and calfs. I think this is a mistake ;-)? Anyway... for now i have an error, and i don't know why! I'm just curious to the solution ;-) – user228548 Nov 5 '14 at 17:40
2

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

  • Is there a possibilty to run this Bottle-server automatic when i start nginx? – user228548 Nov 5 '14 at 18:45
  • Of course. Don't they have example init scripts? – Michael Hampton Nov 5 '14 at 18:46
  • Only a wsgi script. And i have installed Uwsgi. But how can i run the Bottle-script automatically permanent by starting Nginx? – user228548 Nov 5 '14 at 18:50
  • Nginx cannot start your Python process. You have to write a startup script or service configuration suitable for your OS. – cababunga Nov 5 '14 at 19:34
  • I'll will try.... – user228548 Nov 5 '14 at 19:39

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.