-
-
Notifications
You must be signed in to change notification settings - Fork 546
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bad certificate for www.avored.com #485
Labels
Comments
@lhsazevedo I will double check the nginx.conf file. |
I think a valid certificate is still needed to stabilish a connection on the https/www domain and redirect to https/non-www one Here's a simplified copy of a nginx.conf i'm running right now: server {
server_name www.mydomain.example;
# ...
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/mydomain.example-0001/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/mydomain.example-0001/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}
# Redirect https to https+www
server {
listen 443 ssl http2;
server_name mydomain.example;
return 301 https://www.mydomain.example$request_uri;
ssl_certificate /etc/letsencrypt/live/mydomain.example-0001/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/mydomain.example-0001/privkey.pem; # managed by Certbot
}
# Redirect http+www to https+www
server {
if ($host = www.mydomain.example) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name www.mydomain.example;
listen 80;
return 404; # managed by Certbot
}
# Redirect http to https+www
server {
if ($host = mydomain.example) {
return 301 https://$host$request_uri;
} # managed by Certbot
server_name mydomain.example;
listen 80;
return 404; # managed by Certbot
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The SSL certificate served at www.avored.com is only valid for avored.com (without www), thus, a user browsing the former is presented with an warning like this:
Possible solution
Install a valid certificate for www.avored.com
Bonus: Redirect all www requests to non-www (or the other way around)
The text was updated successfully, but these errors were encountered: