I have a static website deployed in the App Platform. This website will have a domain name with Let’s Encrypt SSL configured. My Domain name is hosted on Namecheap, routing emails to another destination. I will add the required records to route non-email requests to the DO App.
This app clients will call a NodeJS back-end service, that will be hosted on a Droplet. This is totally in the back not serving any front-end users.
This Droplet service will have three folders for DEV, TST and PRD environments, probably with different port numbers, hosting the NodeJS service code in each folder.
I want to save the trouble of adding a domain name and an SSL certificate for this Droplet, by somehow using the main front-end web app existing SSL’ed domain, and somehow route the Droplet requests to the Droplet.
Is this something I can do? Is this internal routing can be secured or must it go outside the DO “LAN”? What do I need to configure in order to achieve this?
Thanks! Mor
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.
Hey!
I don’t think that this is technically possible, as your frontend app will essentially run on your customers’ machines when they visit the static site via their browsers. This means that the client machines will be making the requests to the backend, which needs to be publicly accessible.
For this to work, you would need to have a proxy or a load balancer to handle your SSL termination.
What I would personally do is to use Nginx as a reverse proxy for my backend services which will also handle the SSL termination.
You can use Let’s Encrypt with certbot to automate your SSL certificates so you would essentially only need to run the certbot commands once and then it will handle the renewals for you:
Hope that this helps!
Best,
Bobby