Reputation: 9216
i can access to my webserver(nginx) by typing ip address in the web browser and everything works fine! and now i installed Gunicorn and i want to be able to use it with Django projects. i installed it and it works fine. acording to this tutorial: http://gunicorn.org/#quickstart i created a test code and run it. but my problem is that Gunicorn how has connections with nginx? when i enter ip address of my server in the browser i see nginx default page not this python app that i created? how i can see it?
Upvotes: 2
Views: 1767
Reputation: 9806
Nginx serves as a reverse proxy server and hands incoming requests to Gunicorn.
Gunicorn receives requests from the Nginx server, handles them, returns results to Nginx and then Nginx responses to the requests.
So firstly, you have to configure Nginx to indicate which server (ip:port) Nginx have to hande in requests to. Configuration is like this. Then you have to configure Gunicorn to listen to some port and how to handle requests. Conifguration is like this.
Upvotes: 2