Hello everyone! I’m looking forward to receiving support and help from the community! Here’s the challenge!
#Beginner:
To kick it off, I am an extreme beginner at this. so, the more detailed/step-by-step answer you can provide the better for me and any other beginner seeking a similar solution.
#Context: There are three variables for the current issue:
#What’s needed:
#Here is what we’ve done so far:
#How can you help?
Looking forward to your support and help! 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.
Hi there,
Welcome the DigitalOcean community!
What I could suggest in this case is:
As you mentioned add an A record for your subdomain name to point the Droplet’s IP address. After that note that it could take up to a 24/48 hours for the DNS cache to clear over the Globe before you could see the new recrod
Then on your server, I would recommend using Nginx as a reverse proxy, so that when you visit your subdomain name in your browser, you don’t have to type the port after that.
To install Nginx you can follow the steps here:
https://www.digitalocean.com/community/tutorials/how-to-install-nginx-on-ubuntu-20-04
After that you can use the following configuration:
server {
listen 80;
server_name your_domain.com;
root /var/www/html;
index index.html index.htm index.php;
<^> location / {
proxy_pass http://localhost:5001;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}<^>
}
For more details on how to setup NodeJS for production, I would recommend this tutorial here:
Regards, Bobby