Nginx Auto Redirect from http to https
Sometime, we change from http to https, but still have old use or search engine are still using the old http url, so we need create a redirect code to force user using the https, it's also necessary to tell the search engine we are using https now, follow is the nginx config code