I have created a website with Django, running locally in a linux virtual machine on ip adress 192.168.0.111:8000
. Now I want to make this website available for the public, hosted on my own machine.
I have a webproxy (NginxProxyManager) running on my server on ip adress 192.168.0.118:7818 which handles all my other static websites.
I can route my domain name https://django.example.com
to 192.168.0.111:8000
in my webproxy and everything works in DEBUG = True
, but i know this is not the way to do it, and DEBUG = False
does not serve static files properly.
How can i do this? All websites about this topic are takling about publishing to Heroku or something else, but i want to host it locally. Thank you!
Edit: I tried to serve static files from my webproxy like this and it worked fine
location /static/ {
alias /config/static/; # local path on the webproxy server
}
but i'd really like to serve the files from the same computer that is hosting the Django website.