I want to rewrite all HTTP requests on my webserver to be HTTPS requests, I started with the following:
server {
listen 80;
location / {
rewrite ^(.*) //mysite.com$1 permanent;
}
...
One Problem is that this strips away any subdomain information (e.g., node1.mysite /folder), how could I rewrite the above to reroute everything to https and maintain the sub-domain?