Redirect ALL to HTTPS

This will redirect all requests hits to port 80 except domains with separate server blocks. To do this edit virtual host configuration file for your domain and add “return 301 https://$host$request_uri” statement under server section. This will redirect all the incoming requests on HTTP to corresponding https URLs.

Redirect Specific Domain

You may want to redirect a specific domain to HTTPS. Use the following configuration on Nginx to redirect all HTTP requests on tecadmin.net to HTTPS.