You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The deploy documentation for nginx contains the following config:
upstream app_server {
# fail_timeout=0 means we always retry an upstream even if it failed
# to return a good HTTP response
# for UNIX domain socket setups
server unix:/tmp/gunicorn.sock fail_timeout=0;
# for a TCP configuration
# server 192.168.0.7:8000 fail_timeout=0;
}
location @proxy_to_app {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Host $http_host;
# we don't want nginx trying to do something clever with
# redirects, we set the Host: header above already.
proxy_redirect off;
proxy_pass http://app_server;
}
But it does not continue to provide steps to make gunicorn listen to http://app_server or unix:/tmp/gunicorn.sock. As the main recommended deployment option I think it's important to ensure that a minimal working example can be obtained from the docs without any blanks.
Combining this with the default command for Django gunicorn my_app.wsgi seems to make gunicorn listen on port 8000:
Meaning that the documentation for the recommended deployment for Python's largest web framework is not optimal.
Shouldn't we change:
# for UNIX domain socket setups
server unix:/tmp/gunicorn.sock fail_timeout=0;
# for a TCP configuration
# server 192.168.0.7:8000 fail_timeout=0;
to
# for UNIX domain socket setups
# server unix:/tmp/gunicorn.sock fail_timeout=0;
# for a TCP configuration
server 127.0.0.1:8000 fail_timeout=0;
and explain that you still have to run have gunicorn running on 127.0.0.1:8000 behind this (and not that it somehow gets invoked like someone coming from Apache+mod_wsgi might expect) and a simple command to test this like gunicorn -w 3 <your_wsgi_module> followed by a note that there are other better ways to ensure gunicorn is always running and then link to the monitoring part of the docs?
The text was updated successfully, but these errors were encountered:
The deploy documentation for
nginx
contains the following config:But it does not continue to provide steps to make
gunicorn
listen tohttp://app_server
orunix:/tmp/gunicorn.sock
. As the main recommended deployment option I think it's important to ensure that a minimal working example can be obtained from the docs without any blanks.Combining this with the default command for Django
gunicorn my_app.wsgi
seems to make gunicorn listen on port 8000:Meaning that the documentation for the recommended deployment for Python's largest web framework is not optimal.
Shouldn't we change:
to
and explain that you still have to run have gunicorn running on
127.0.0.1:8000
behind this (and not that it somehow gets invoked like someone coming from Apache+mod_wsgi might expect) and a simple command to test this likegunicorn -w 3 <your_wsgi_module>
followed by a note that there are other better ways to ensuregunicorn
is always running and then link to the monitoring part of the docs?The text was updated successfully, but these errors were encountered: