|
@ -1,9 +1,11 @@ |
|
|
|
|
|
@if ($redirect_www) |
|
|
server { |
|
|
server { |
|
|
listen 80; |
|
|
listen 80; |
|
|
listen [::]:80; |
|
|
listen [::]:80; |
|
|
server_name {{ $domain }}@if ($redirect_www) www.{{ $domain }}@endif; |
|
|
|
|
|
|
|
|
server_name {{ $domain }} www.{{ $domain }}; |
|
|
return 301 http://{{ $domain }}$request_uri; |
|
|
return 301 http://{{ $domain }}$request_uri; |
|
|
} |
|
|
} |
|
|
|
|
|
@endif |
|
|
|
|
|
|
|
|
server { |
|
|
server { |
|
|
listen 80; |
|
|
listen 80; |
|
|