Use the following to redirect to https on nginx.
server {
listen 80;
server_name my-domain.com;
return 301 https://$server_name$request_uri;
}
Home » Redirect rules in Nginx
Use the following to redirect to https on nginx.
server {
listen 80;
server_name my-domain.com;
return 301 https://$server_name$request_uri;
}