aboutsummaryrefslogtreecommitdiffstats
path: root/roles/web/templates/sites/1314233.conf.j2
blob: de6d56fd35820c78fdc609c04615c7b9ecef91a8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
{% set domain = "1314233.xyz" %}
{% set domain_new = "233233.xyz" %}
#
# Nignx/sites: 1314233.conf
# Redirect {{ domain }} to {{ domain_new }}
#
# Aaron LI
#

{% if domains_hascert[domain] %}
server {
    listen            443 ssl http2;
    listen       [::]:443 ssl http2;
    server_name  {{ domain }}  *.{{ domain }};

    # SSL/TLS Certificate kindly provided by Let's Encrypt
    ssl_certificate      {{ web.ssl_root }}/{{ domain }}/fullchain;
    ssl_certificate_key  {{ web.ssl_root }}/{{ domain }}/key;

    return  301  $scheme://{{ domain_new }}$request_uri;
}
{% endif %}