server {
listen 80;
listen [::]:80;
server_name test.example.com;
root /srv/www/test.example.com;
}
server {
listen 80;
listen [::]:80;
server_name example.com www.example.com;
return 301 https://example.com$request_uri;
}
server {
listen 443 ssl spdy;
listen [::]:443 ssl spdy;
server_name example.com;
root /srv/www/example.com;
}