Hosting Multiple Django Websites on a VPS

I'm moving away from WordPress and into bespoke Django websites.

I've settled on Django as my Python framework, my only problems at the moment are concerning hosting. My current shared hosting environment is great for WordPress (WHM on CloudLinux), but serving Django on Apache/cPanel appears to be hit and miss, although I haven't tried it as yet with my new hosting company. - who have Python enabled in cPanel.

What is the easiest way for me to set up a VPS to run a hosting environment for say, twenty websites with unique URLs? I develop everything in a virtualenv, but I have no experience in running Django in a production environment as yet. I would assume that venv isn't secure enough or has scalability issues? I've read some things about people using Docker to set up separate Django instances on a VPS, but I'm not sure whether they wrote their own management system.

It's my understanding that each instance Python/Django needs uWSGI and Nginx residing within that virtual container? I'm looking for a simple and robust solution to host 20 Django sites on a VPS - is there an out of the box solution? I'm also happy to develop one and set up a VPS if I'm pointed in the right direction.

Any wisdom would be gratefully accepted.

Andy :)


Solution 1:

Seems like this question was already answered on stackoverflow.

https://stackoverflow.com/a/65930983/7845355