Question

I started develop two sites separately, but now I need to merge them (so http://site1.com/site2) points to site2 (which has a separate settings.py).

I could probably refactor the code and make site2 an app of site1, but I suspect there is an easy way. Also, site2 uses a different database, and I don't intend to mix up both databases...

If I want to use subdomain (like site2.site1.com), will it make it easier?

Any suggestion? Thanks.

Was it helpful?

Solution

The easiest way to do this is to leave both Django applications separate but present them as one site using a reverse proxy such as nginx. The applications will live on separate servers or at least be served on the same server on separate ports, and nginx will proxy requests to one application or the other based on what path is requested.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top