Hi,
following setup: We do have a droplet with node.js (ubuntu) and need to secure it via ssl. Let’s say we have the domain example.com - we just using the node.js server for some parts (chat, etc.).
Thus for me the question is, how to achieve that we can use ssl with it. Should we create a subdomain like services.example.com and direct that subdomain to the ip of our droplet via dns and then buy the certificate for that ?
Some hints would be great, thanks!
Best, Nico
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!
Hi,
I would recommend setting up nginx as a reverse proxy for your Nodejs application. Take a look at the following tutorial (ignoring anything related to Apache):
If you have Nodejs set up and ready to go, you can skip straight to the Set Up Reverse Proxy Server section. You will want to replace APP_PRIVATE_IP_ADDRESS in nginx’s config with 127.0.0.1.
Once you’ve done that, configure your Nodejs app to listen on 127.0.0.1:8080 or any other port that is unused and over 1024 (make sure you update the nginx config with the new port as well).
To install an SSL certificate, follow this tutorial:
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.