Answer the question
In order to leave comments, you need to log in
How to configure ssl on subdomains?
There is a bulletin board site. It works on subdomains. One city = 1 subdomain.
For example: msk.site.ru
There is an ssl certificate (https) that works with all subdomains. Everything works, everything is ok.
There is also a redirect from www.*.site.ru to *.site.ru and, accordingly, from http to https.
Recently, a problem has surfaced with addresses like: https://www.msk.site.ru. It shows something like:
Your connection is not secure
The owner of www.msk.site.ru set up his website incorrectly. To protect your information from being stolen, Firefox did not connect to this website.
server {
listen 80;
server_name *.msk.site.ru;
return 301 https://msk.site.ru$request_uri;
}
server {
listen 443;
ssl on;
ssl_certificate /home/site/www/prod/ssl-bundle.crt;
ssl_certificate_key /home/site/www/prod/site.key;
#enables all versions of TLS, but not SSLv2 or 3 which are weak and now deprecated.
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
server_name *.msk.site.ru;
return 301 $scheme://msk.site.ru$request_uri;
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question