Question

one subdomain name can only be used in one droplet, is it true ??

hey, I am very new to Networking and cloud, i was trying to host two servers in same droplet, i.e., nodejs and Angular , i have one sub domain eg: test.example.com, is it possible that i can host these two server under this same subdomain name.


Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hello, @keerthidl

Speaking of DNS you can point a subdomain name to a single IP address (point the subdomain to the IP address of your droplet).

You can use multple subdomains (and host multiple websites as well) on a single droplet. You just need to configure the Virtual Hosts for the subdomains in the web server (Apache, Nginx) configuration files.

You can check out tutorial on how to set up a node.js application on Ubuntu 18.04

https://www.digitalocean.com/community/tutorials/how-to-set-up-a-node-js-application-for-production-on-ubuntu-18-04

Prerequisites

This guide assumes that you have the following:

An Ubuntu 18.04 server setup, as described in the initial server setup guide for Ubuntu 18.04. You should have a non-root user with sudo privileges and an active firewall.

A domain name pointed at your server’s public IP. This tutorial will use the domain name example.com throughout.

Nginx installed, as covered in How To Install Nginx on Ubuntu 18.04.

Nginx configured with SSL using Let’s Encrypt certificates. How To Secure Nginx with Let’s Encrypt on Ubuntu 18.04 will walk you through the process.

Hope this helps!

Regards, Alex