'Certbot Redirection of HTTP to HTTPS from Nginx not working
I am trying to issue an SSL certificate for my website, although the message was successful (as attached image) but when accessing that domain, it is not working
Solution 1:[1]
if you are using Cloudflare, go to SSS/TLS tab, then go to Overview, then on the right side of the page, select Full(strict)
Solution 2:[2]
You must make sure to configure it in Nginx also:
ssl_certificate /path/to/certificate.crt;
ssl_certificate_key /path/to/certificate_key.key;
And make sure the server is listening on port 443.
If you want to force https://
then add a new nginx server declaration listening only on port 80 with the following:
location / {
return 301 https://$host$request_uri;
}
There may be better ways to do that also, but I have little information to go on from this question, with no further information provided, I don't even know if you already did this or not, but it wouldn't work to just generate a cert, you also have to use it.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Kachinga |
Solution 2 | QuestionMark |