Using maps in Nginx it is possible to selectively redirect only certain URL’s or domains to HTTPS.

Go here if you want to  redirect your full site to HTTPS

Redirect specific domains to HTTPS

To redirect only domains that have their own storefront and a SSL certificate to HTTPS, but keep the non-SSL domains on HTTP, create a configuration file /data/web/nginx/http.ssl_maps:

Add all domains and the preferred protocol.

Next, add an entry to /data/web/nginx/server.rewrites:

Now all domains that have SSL specified in the mapping will redirected to HTTPS but leaving the domains without SSL on HTTP.

Redirect specific URL’s to HTTPS

The same trick for domains can be used to redirect specific URL’s to a preferred protocol:

Add another mapping to /data/web/nginx/http.ssl_maps:

You can add any URL to the mapping that should be redirected to a certain protocol.

Next, create an entry in /data/web/nginx/server.rewrites:

And all URL’s listed in the map will be redirected to the specified scheme.