Nowadays, SSL protocol is becoming more popular for webmasters who want to security through an encrypted connection their server. After install SSL, how can you redirect HTTP to HTTPS ? Oh, this post will help you.
HTTPS(Hyper Text Transfer Protocol Secure) protocol is a secure version of HTTP which can used for secure transactions of ecommerce sites, it is also make your site have good ranking in Google. In this tutorial we will show you how to redirect all traffic from HTTP to HTTPS using nginx rewrite.
In nginx.conf, just add or modify like bellow:
When finish you will have something like this:
Now Restart Nginx
Very easy right ? I hope this simple tip can help you 😀