Multiple Django Project + Nginx on subpath

后端 未结 2 413
心在旅途
心在旅途 2021-01-22 11:25

I am trying to run multiple dashboards written in Django to run on my server, but am not getting it up and running. Followed this digital ocean tutorial and modified it accordin

2条回答
  •  臣服心动
    2021-01-22 12:18

    So the good news is that your gunicorn and nginx configs as posted look correct.

    (1) Problem #1 default web page shows:

    This is almost always caused by the default nginx config file default.conf. Just remove that file and you should see your site popping up instead. The only other thing to check for is to test and reload nginx to make sure your configuration is valid and loaded:

    sudo nginx -t
    sudo systemctl reload nginx
    

    (2) Problem #2 curl to the unix socket doesn't return what you'd expect. The curl command looks slightly off: try something like:

    curl -v --no-buffer --unix-socket /run/gunicorn_fdab.sock http://localhost/route/available/in/django
    

    You can pair that curl while tailing the gunicorn logs with journalctl --since today -u gunicorn -f

提交回复
热议问题