I have two droplets (each with Ubuntu 20.04.3 LTS) on digital ocean which are used for frontend (React 17.0.2) and backend (Django 2.2.5) server, both with Nginx 1.18.0. The frontend is connected to a domain-name while the backend is not.
I was following the tutorial on digitalocean (https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-20-04) on how to secure nginx. I succeeded in setting up SSL for the frontend (React App). However, when I finished, the backend (Django 2.2.5) was not connected anymore or at least the frontend failed to get the data it usually got from there.
On stackoverflow I found a related question but with no satisfiable answer. My backend currently has no domain name connected to it (is accessed via IP address) and therefore Let’s encrypt certificate does not work.
My questions:
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!
Problem solved by adding subdomain for backend django server as well, installing LetsEncrypt certificate via certbot (and adjusting backend URL on the frontend to the new https://domain.xyz). After this, enabling HTTPS on the frontend side did not anymore break the connection and website works now flawlessly.
Hope this helps if someone runs into the same issue.
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.
From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.