miniflux/templates/nginx.conf.j2
author Luke Hoersten <luke@hoersten.org>
Sat, 30 Jan 2021 11:05:24 -0600
changeset 148 8e981afb914b
parent 130 46785fdb4fc5
child 200 10051617d075
permissions -rw-r--r--
Updated Minecraft Versions
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
130
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     1
server {
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     2
    listen 80;
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     3
    listen [::]:80;
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     4
    server_name {{nginx_server_name}};
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     5
    return 301 https://$host$request_uri;
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     6
}
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     7
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     8
server {
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
     9
    listen 443 ssl http2;
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    10
    # listen [::]:443 ssl ipv6only=on;
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    11
    server_name {{nginx_server_name}};
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    12
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    13
    ssl_certificate {{nginx_ssl_cert}};
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    14
    ssl_certificate_key {{nginx_ssl_privkey}};
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    15
    include /etc/letsencrypt/options-ssl-nginx.conf;
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    16
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    17
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    18
    ssl_ecdh_curve X25519:prime256v1:secp384r1:secp521r1;
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    19
    ssl_stapling on;
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    20
    ssl_stapling_verify on;
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    21
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    22
    location / {
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    23
        proxy_pass {{nginx_proxy_pass}};
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    24
        proxy_redirect off;
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    25
        proxy_set_header Host $host;
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    26
        proxy_set_header X-Real-IP $remote_addr;
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    27
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    28
        proxy_set_header X-Forwarded-Proto $scheme;
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    29
    }
46785fdb4fc5 Added miniflux role.
Luke Hoersten <luke@hoersten.org>
parents:
diff changeset
    30
}