Hi all,
I have a nice little domain with a blog on the front page, secured with LetsEncrypt. So far, so good; but I like the domain I’m using so much that I want to point a subdomain at another service I’ve got running on a different IP.
I entered a new A record and added the following to my sites-enabled file:
server {
server_name sub.domain.tld;
location / {
proxy_pass http://x.x.x.x:80;
}
Then, I ran certbot and generated an SSL certificate for the subdomain without a hitch.
However, when I try navigating to https://sub.domain.tld, it will not connect at all; but using http:// works fine.
I’m not terribly experienced with Nginx and I’m afraid of losing track of changes and screwing up my config. Any advice?
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 @sitful,
Hmm, this is indeed interesting. Having said that, this seems a little too complex. Can you confirm if you have the said service on the same droplet or on a different one?
If you have the service on another droplet,I’ll recommend just using your DNS to point your subdomain to it and install the Let’s Encrypt certificate there rather than going through all the hassle.
If you have the service on the same droplet, you’ll need to create an https server block for your subdomain. If unsure how to do so, I’ll recommend checking out the following tutorial:
Regards, KFSys
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.