Answer the question
In order to leave comments, you need to log in
Nginx + ispconfig redirect to https, why does it redirect to ssl subdomain for which there is no host in nginx?
In general, there is a domain for example test.ru. There are domains qwe.test.ru and so on.
In ispconfig, I saw in the nginx directives for the site
location / {
if ($scheme = "http") {
return 301 https://$server_name$request_uri;
}
}
if ($server_name != $host){
return 301 http://$server_name$request_uri;
}
. But do not rewrite it every time in the last host. We need a solution without crutches, ideally in nginx.conf and without errors with ssl because the certificate does not match the domain
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