I’m following this guide. The development methods for serving my Django app work (using
python manage.py runserver and
gunicorn --bind 0.0.0.0:8000 myproject.wsgi:application), but when I set up the systemd and Nginx configuration files, I just get a 502 Nginx error page. I believe that Nginx is supposed to create the relevant
.sock file at some point, but I don’t see one in my project directory.
Ultimately, I would actually like my Django app to be served on a subdirectory of the domain, like mysite.com/sub/, since there is a website currently being served on the root domain.
Your help is greatly appreciated,
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.