ipxe.archlinux.org.j2 1.68 KB
Newer Older
1
2
3
4
5
6
server {
    listen       80;
    listen       [::]:80;
    server_name  {{ domain['domain_name'] }};

    access_log   /var/log/nginx/{{ archweb_domain }}/access.log reduced;
Kristian Klausen's avatar
Kristian Klausen committed
7
    access_log   /var/log/nginx/{{ archweb_domain }}/access.log.json json_reduced;
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
    error_log    /var/log/nginx/{{ archweb_domain }}/error.log;

    include snippets/letsencrypt.conf;

    location / {
        access_log off;
        return 301 https://$server_name$request_uri;
    }
}

server {
    listen       443 ssl http2;
    listen       [::]:443 ssl http2;
    server_name  {{ domain['domain_name'] }};

    access_log   /var/log/nginx/{{ archweb_domain }}/access.log reduced;
Kristian Klausen's avatar
Kristian Klausen committed
24
    access_log   /var/log/nginx/{{ archweb_domain }}/access.log.json json_reduced;
25
26
27
28
29
30
31
32
    error_log    /var/log/nginx/{{ archweb_domain }}/error.log;

    ssl_ciphers AES128-SHA:AES256-SHA:AES128-SHA256:AES256-SHA256;

    ssl_certificate      /etc/letsencrypt/live/{{ archweb_domain }}/fullchain.pem;
    ssl_certificate_key  /etc/letsencrypt/live/{{ archweb_domain }}/privkey.pem;
    ssl_trusted_certificate /etc/letsencrypt/live/{{ archweb_domain }}/chain.pem;

33
    location /releng/netboot/ {
34
        access_log   /var/log/nginx/{{ archweb_domain }}/access.log main;
Kristian Klausen's avatar
Kristian Klausen committed
35
        access_log   /var/log/nginx/{{ archweb_domain }}/access.log.json json_main;
36
37
38
39
40
        include uwsgi_params;
        uwsgi_pass archweb;
    }

    # Cache django's css, js and png files.
41
    location /static/ {
42
43
44
        expires 30d;
        add_header Pragma public;
        add_header Cache-Control "public";
45
        alias /srv/http/archweb/collected_static/;
46
47
48
49
50
51
52
    }

    location / {
        access_log off;
        return 301 https://{{ archweb_domain }}$request_uri;
    }
}