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
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
I suggest you try not doing any URL rewrites in the nginx config. Do the proxy_pass to the sockets as required, and then adapt your Django URL configs to match the URLs you want to use in the different apps.