When I perform gunicorn --log-file=- draft1.wsgi:application
to see the gunicorn log of my app, it says Listening at: http://127.0.0.1:8000
which is the local Django development server. Can somebody tell me why it does this on my live django server? Here is the full log:
(env) james@postr:~/postr$ gunicorn --log-file=- draft1.wsgi:application
[2018-02-13 07:23:33 +0000] [25004] [INFO] Starting gunicorn 19.7.1
[2018-02-13 07:23:33 +0000] [25004] [INFO] Listening at: http://127.0.0.1:8000 (25004)
[2018-02-13 07:23:33 +0000] [25004] [INFO] Using worker: sync
[2018-02-13 07:23:33 +0000] [25007] [INFO] Booting worker with pid: 25007
This is default and desired behavior as gunnicorn deploy documentation clearly states
We strongly recommend to use Gunicorn behind a proxy server.
So you should have nginx configured to proxy the following
If you still want to run gunnicorn on different ip/port combo you can use bind setting
-b ADDRESS, --bind ADDRESS
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.