Two Application on same droplet one in Main and other in Subdomain

Posted August 17, 2020 1.2k views
DigitalOcean 1-Click Apps MarketplaceDevelopment

Hi I am not from Web development background . I am planing to run an Online testing on main domain and a discussion community on subdomain. I have already a Community running in a droplet and Subdomain. Can I run an online exam on same droplet but on main domain?


These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
2 answers

Hi there @vupeshmohanty,

Yes indeed this is doable. What you could do is to set up virtual hosts if you are using Apache or if you are using Nginx you can set up server blocks. That way you can have multiple websites hosted on the same Droplet.

Depending on what webserver you are using you can follow the steps here:

  • For Nginx, you can follow this guide here:

  • And for Apache you can follow this tutorial here:

Let me know if you have any questions!

by Brennen Bearnes
The Apache web server is the most popular way to serve web content on the internet. Apache has the ability to serve multiple domains from a single server by using a mechanism called "virtual hosts". If a virtual host is configured correctly for each domain, the web server can correctly route traffic to the appropriate files based on the domain name requested. In this guide, we'll demonstrate how to configure Apache virtual hosts on an Ubuntu 16.04 server.

Thanks a lot for the reply :) Let me try .