By adilrazadxb7
Hi,
First time writing here, Hope someone could help.
I have a domain DNS pointed as below:
A RECORD
@ pointed to SERVER_IP www pointed to SERVER_IP
I am not using CNAME as I was following tutorial on Digital Ocean. Let me know if that is the route I should go for.
Anyways, I followed all the tutorial as mentioned in Initial Ubuntu Server and Also Lemp Install. Nginx Installed, PHP working good.
Then I try to install SSL Certificate using Certbot. CertBot Tutorial finished with no errors however, My website is not having redirection error. I selected redirect all http to https since my goal is that
http://DOMAIN.tld should forward to https://www.DOMAIN.tld http://www.DOMAIN.tld should forward to https://www.DOMAIN.tld
Also note if I enter my SERVER_IP in browser it was showing nginx default page. I removed unlink default from the /sites-enabled/ I’m not sure if that is the cause of the error.
Please let me know what am I doing wrong since I’m stuck here for a long time.
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 there @adilrazadxb7,
Can you share your Nginx server blocks from the sites-enabled folder? Also, was the site working as expected before adding the SSL certificate?
It is possible that you either have an incorrectly set document root or that the server name was not specified in the Nginx server block.
Another possible problem is that if you are using a CMS like WordPress, you might have to update your Site and Home URLs from http to https too.
Regards, Bobby
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.