# Hosting Django App in a VPS using subdomains.

**URL:** <https://forum.djangoproject.com/t/hosting-django-app-in-a-vps-using-subdomains/35721>\
**Category:** Deployment\
**Created:** [October 16, 2024, 8:23pm UTC](https://forum.djangoproject.com/t/hosting-django-app-in-a-vps-using-subdomains/35721 "2024-10-16T20:23:25Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![dev-Kevo](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/dev-kevo/32/23055_2.png) [@dev-Kevo](https://forum.djangoproject.com/u/dev-Kevo)\
**Post date:** [October 16, 2024, 8:23pm UTC](https://forum.djangoproject.com/t/hosting-django-app-in-a-vps-using-subdomains/35721/1 "2024-10-16T20:23:25Z")

</div>

I have a VPS and Domain and i want to create subdomains so that i can host several django projects. Any one who knows How to do this Please to help me???

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [October 16, 2024, 8:56pm UTC](https://forum.djangoproject.com/t/hosting-django-app-in-a-vps-using-subdomains/35721/2 "2024-10-16T20:56:27Z")

</div>

Welcome @dev-Kevo !

Side note: When creating a topic here, please keep the title to a brief description of the issue. Do not try to explain everything in the title. Use the body of your post for that.  
(I’ve taken the liberty of swapping your title and description to match these guidelines.)

What is your specific question here?

For clarity, are you saying you want separate domains such as `project1.example.com` and `project2.example.com` to be served from the same server?

If so, what web server are you going to use? Both nginx and Apache support doing this. (For example, see the [`server_name`](https://nginx.org/en/docs/http/ngx_http_core_module.html#server_name) directive in nginx.

---

<div class="post-metadata">

**Author:** ![dev-Kevo](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/dev-kevo/32/23055_2.png) [@dev-Kevo](https://forum.djangoproject.com/u/dev-Kevo)\
**Post date:** [October 16, 2024, 9:09pm UTC](https://forum.djangoproject.com/t/hosting-django-app-in-a-vps-using-subdomains/35721/3 "2024-10-16T21:09:22Z")

</div>

Thankyou @KenWhitesell AM New tothis forum.thats why. can you please help me set up a a subdomain in Hostinger vps and OpenliteSpeed??

---

<div class="post-metadata">

**Author:** ![KenWhitesell](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/kenwhitesell/32/280_2.png) [@KenWhitesell](https://forum.djangoproject.com/u/KenWhitesell)\
**Post date:** [October 16, 2024, 10:17pm UTC](https://forum.djangoproject.com/t/hosting-django-app-in-a-vps-using-subdomains/35721/4 "2024-10-16T22:17:45Z")

</div>

This is documented at [Configuration | OpenLiteSpeed Documentation | OpenLiteSpeed Documentation](https://docs.openlitespeed.org/config/). That’s probably the best place to start.

---

<div class="post-metadata">

**Author:** ![boxed](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/boxed/32/11975_2.png) [@boxed](https://forum.djangoproject.com/u/boxed)\
**Post date:** [October 17, 2024, 7:33am UTC](https://forum.djangoproject.com/t/hosting-django-app-in-a-vps-using-subdomains/35721/5 "2024-10-17T07:33:22Z")

</div>

Maybe look into Dokku. But this is really not a a Django question, like Ken says.

---

<div class="post-metadata">

**Author:** ![Nilima32](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.djangoproject.com/nilima32/32/32055_2.png) [@Nilima32](https://forum.djangoproject.com/u/Nilima32)\
**Post date:** [March 31, 2026, 5:07am UTC](https://forum.djangoproject.com/t/hosting-django-app-in-a-vps-using-subdomains/35721/6 "2026-03-31T05:07:51Z")

</div>

Hi,

You can host multiple projects by using subdomains to create them in your domain panel. Set up a web server for which you can use Nginx and Gunicorn or uWSGI for separating server blocks for subdomains. With it, you can run each Django project in its own virtual environment.
