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?

Thanks

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.

×
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:

https://www.digitalocean.com/community/tutorials/how-to-set-up-nginx-server-blocks-virtual-hosts-on-ubuntu-16-04

  • And for Apache you can follow this tutorial here:

https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-16-04

Let me know if you have any questions!
Regards,
Bobby

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 .

Submit an Answer