redirect to www. https
This commit is contained in:
@@ -20,15 +20,21 @@ http {
|
|||||||
|
|
||||||
# Redirect everything else to HTTPS
|
# Redirect everything else to HTTPS
|
||||||
location / {
|
location / {
|
||||||
return 301 https://$host$request_uri;
|
return 301 https://www.$DOMAIN$request_uri;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 443 ssl;
|
||||||
|
server_name $DOMAIN;
|
||||||
|
|
||||||
|
return 301 https://www.$DOMAIN$request_uri;
|
||||||
|
}
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 443 ssl;
|
listen 443 ssl;
|
||||||
http2 on;
|
http2 on;
|
||||||
server_name $DOMAIN www.$DOMAIN;
|
server_name www.$DOMAIN;
|
||||||
|
|
||||||
root /etc/nginx/html;
|
root /etc/nginx/html;
|
||||||
index index.html;
|
index index.html;
|
||||||
|
|||||||
Reference in New Issue
Block a user