I can't get this nginx rule which redirects from http to https to work
server_name domain.com www.domain.com;
access_log /var/log/nginx/http_to_https.txt access;
return 301 https://domain.com$request_uri;
However if I access http://domain.com/ it doesn't redirect, it's like the website is dead, whats up with that?