nginx serving Django static media | 502 bad gateway

后端 未结 5 1351
暗喜
暗喜 2021-02-11 09:14

I\'m trying to serve Django static media through nginx, Here\'s my nginx.conf

server {
    listen       7777;
    listen       localhost:7777;
    server_name  e         


        
5条回答
  •  暖寄归人
    2021-02-11 10:13

    Unless you're doing unusual things, there's no reason to run both apache and nginx.

    Nginx + gunicorn is likely to work better than apache + modwsgi at this point in time.

    Gunicorn deployment docs are here:

    https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/gunicorn/

    and the nginx config for deploying that is here:

    http://gunicorn-docs.readthedocs.org/en/latest/deploy.html

提交回复
热议问题