I have http:// and https:// on the same host like the following:
server {
listen 80;
listen 443 ssl;
...
...
}
What I
It would also be more of an NGINX best practice to do a 301 redirect instead of using the if statement (see Server name on http://wiki.nginx.org/Pitfalls). I created a gist with an nginx.conf configured for SSL, Rails and Unicorn
https://gist.github.com/Austio/6399964
Here would be the relevant section for yours.
server {
listen 80;
server_name domain.com;
return 301 https://$host$request_uri;
}