Nginx redirect http to https

By.

min read

My profile

Share this:

[code:1:644ee9572c]server {
listen 80 default_server;
listen [::]:80 default_server;
server_name example.com www.example.com;
return 301 https://$server_name$request_uri;
}
[/code:1:644ee9572c]

Source: https://bjornjohansen.no/redirect-to-https-with-nginx

Share this:

Leave a Reply

Your email address will not be published. Required fields are marked *