server { listen 80; server_name your.domain.com; return 301 https://$server_name/$1; }server { listen 443 ssl; server_name your.domain.com; ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem; ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key; location / { proxy_buffer off; proxy_set_header Host 10.0.0.1; # required to avoid DNS rebind attack warnings proxy_set_header Referer http://10.0.0.1; # require to avoid wrong HTTP_REFERER warnings proxy_pass http://10.0.0.1; }}