This also doesn't work :
[code]
server {
listen 192.168.0.19:80; # we serve both http and https
listen 192.168.0.19:443 default_server ssl;
server_name *.mydomain.com;
ssl_certificate
ssl_certificate_key
if ($host = abc.mydomain.com) {set $test A;}
if ($scheme = http) {set $test "${test}B";}
if ($test = AB) {
return 301 https://$host$request_uri;
break;
}
...
}
[/code]
[code]
server {
listen 192.168.0.19:80; # we serve both http and https
listen 192.168.0.19:443 default_server ssl;
server_name *.mydomain.com;
ssl_certificate
ssl_certificate_key
if ($host = abc.mydomain.com) {set $test A;}
if ($scheme = http) {set $test "${test}B";}
if ($test = AB) {
return 301 https://$host$request_uri;
break;
}
...
}
[/code]