By keerthidl
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!
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
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
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.