login community faq

I'm trying to deploy a Django web app using gunicorn behind nginx. This is my configuration nginx.conf file:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
server {    
    listen       80;
    server_name  www.example.com;

    access_log   /some/path/access.log;
    error_log    /some/path/error.log;

    location  / {
        proxy_pass            http://127.0.0.1:11001/;
        proxy_redirect        off;
        proxy_set_header      Host             $host;
        proxy_set_header      X-Real-IP        $remote_addr;
        proxy_set_header      X-Forwarded-For  $proxy_add_x_forwarded_for;
        client_max_body_size  10m;
    }
}

My question is, which value should I use for port number in listen directive and proxy_pass?

How many Custom Apps (listening on port) should I create? Just one for nginx or one for nginx and one one for gunicorn?

asked Oct 06 '12 at 17:26

Guandalino's gravatar image

Guandalino
3718


For your nginx you would use the port that is assigned from the control panel to listen on.

As well, going by this example you will also need to reserve a port for each instance of gunicorn you are going to run.

answered Oct 06 '12 at 18:14

bmeyer71's gravatar image

bmeyer71 ♦♦
8512310

Your answer
If you have an answer to the above question, then use the form below. Otherwise, use the appropriate 'add new comment' button above to post your feedback.
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Tags:

×127
×19
×10
×8

Asked: Oct 06 '12 at 17:26

Seen: 413 times

Last updated: Oct 06 '12 at 18:14

Plans & prices    Sign up    Why WebFaction?    Contact us    Affiliate program    Support    Legal    Jobs    Blog    Control panel login
Powered by OSQA
© Copyright 2003-2012 Swarma Limited - WebFaction is a service of Swarma Limited