Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
Your redirect is generally correct, it's not about him, probably.
You should have two separate server sections, one of which provides a redirect on port 80, the second one allows the site to work on https. Perhaps this is the problem, since when you add a redirect, https also falls off for you?
server {
listen 80;
server_name sub1.mydomain.com sub2.mydomain.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl;
server_name sub1.mydomain.com sub2.mydomain.com;
...
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question