By richv101
Hi, I have installed wordpress and lets encrypt by using easy engine. However, one problem I am having is that the www. version of my site is not redirecting to the https:// version. This only seems to affect the home page. for instance www.mysite.com just returns a nginx 503 error page. https://mysite.com loads just fine. www.mysite.com/contact-us as a for instance does redirect to https://mysite.com/contact-us
I have created an A name record as recommended in the setup guides which is hostname www.mysite.com redirects to “IP address”
Any help as to what I am doing wrong would be greatly appreciated.
Thanks
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 Bobby,
Thanks for the reply. I have run the error file command and had the follow reply: tail: cannot open ‘/var/log/nginx/error.log’ for reading: No such file or directory
Sorry I am not totally sure how to view the Nginx server block, could you please explain how i can do this. Thanks
Hello,
I would recommend first starting with the 503 error. You would have to check your Nginx error log for more information:
tail -100 /var/log/nginx/error.log
If you are not sure what the error means feel free to share it here and I can try to advise you further.
Also regarding the redirect, I guess that it is something in your config that is missing. Can you share your Nginx server block here so that I could see the exact setup that you have?
Regards, Bobby
Have you checked your PTR record settings. Seems like you may not have setup the www setting for your IP. There’s a “@” and a “www”.
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.