Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Multiple Django Sites, one server

I have multiple sites for the same client, on the same server, running django, e.g. fooplumbing.com and bazheating.org. These two sites would each have different django apps, that is the plumbing site shouldn't be able to access the heating apps, and vice versa. There are no objects shared between the two sites, and each needs its own separate admin site.

Is this possible through something like the sites framework, or would I need to have two separate apache instances running the sites? (Yes, I need to use apache - no choice)

It's a Linux server, so is there some clever way of using symlinks to do this? I'm pretty experienced with basic django development, but I have no clue when it comes to server management.

like image 908
Lexo Avatar asked Jan 20 '23 11:01

Lexo


1 Answers

The sites framework won't help you - they should be served as completely separate WSGI applications.

But there's no need for separate Apache instances. Just configure Apache to serve separate VirtualHosts, each with its own WSGI file.

like image 178
Daniel Roseman Avatar answered Jan 30 '23 18:01

Daniel Roseman