# Multiple Django Apps

**URL:** <https://forum.djangoproject.com/t/multiple-django-apps/586>\
**Category:** Using Django\
**Created:** [December 8, 2019, 4:21pm UTC](https://forum.djangoproject.com/t/multiple-django-apps/586 "2019-12-08T16:21:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![paulonteri](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/paulonteri/32/411_2.png) [@paulonteri](https://forum.djangoproject.com/u/paulonteri)\
**Post date:** [December 8, 2019, 4:21pm UTC](https://forum.djangoproject.com/t/multiple-django-apps/586/1 "2019-12-08T16:21:08Z")

</div>

How can I run **multiple Django apps** , each with its own domain, on **one GCP Compute Engine (Ubuntu) instance**?

---

<div class="post-metadata">

**Author:** ![andrewgodwin](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/andrewgodwin/32/2_2.png) [@andrewgodwin](https://forum.djangoproject.com/u/andrewgodwin)\
**Post date:** [December 8, 2019, 4:35pm UTC](https://forum.djangoproject.com/t/multiple-django-apps/586/2 "2019-12-08T16:35:12Z")

</div>

This is less a Django question and more of a systems administration/ops question - running multiple apps on a machine is possible, but you have to do what is called “virtual hosting”, where you have a server process (usually Nginx) in front of multiple running Django instances, which routes to the right one based on the hostname.

I’m not going to do a complete guide here, as it’s a long and in-depth process with a lot of potential issues - you can search around for guides, but this guide from DigitalOcean covers most of what I’d want to look at: [https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-uwsgi-and-nginx-on-ubuntu-16-04](https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-uwsgi-and-nginx-on-ubuntu-16-04) (it’s for an older Ubuntu, but most of what is talked about there should be relevant, making sure you use the Python 3 parts).

---

<div class="post-metadata">

**Author:** ![mblayman](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/mblayman/32/101_2.png) [@mblayman](https://forum.djangoproject.com/u/mblayman)\
**Post date:** [December 12, 2019, 2:20am UTC](https://forum.djangoproject.com/t/multiple-django-apps/586/3 "2019-12-12T02:20:48Z")

</div>

@andrewgodwin’s suggestion is a good one, especially if your Django apps are completely separate in function.

If the apps are _not_ separate in function, you might want to check out Django’s [sites](https://docs.djangoproject.com/en/2.2/ref/contrib/sites/) contrib module. The sites module is for handling different domains that ultimately point to the same Django project. The docs explain a possible scenario for using it through an example.

> The Django-powered sites [LJWorld.com](http://www.ljworld.com/) and [Lawrence.com](http://www.lawrence.com/) are operated by the same news organization – the Lawrence Journal-World newspaper in Lawrence, Kansas. [LJWorld.com](http://LJWorld.com) focuses on news, while [Lawrence.com](http://Lawrence.com) focuses on local entertainment. But sometimes editors want to publish an article on _both_ sites.

(See [The “sites” framework | Django documentation | Django](https://docs.djangoproject.com/en/2.2/ref/contrib/sites/#associating-content-with-multiple-sites))

So if your multiple sites fit into that narrow use case, it might be a good tool to consider.
