Report this

What is the reason for this report?

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

Posted on May 5, 2020

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.



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!

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.

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.