summaryrefslogtreecommitdiff
path: root/docker/nginx-default.conf
blob: 3896e25958245583ac0925dde09aeb296561d32a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
server {
    listen       80;
    server_name  localhost;
    # access_log  /var/log/nginx/host.access.log  main;
    gzip on;
    gzip_vary on;
    gzip_comp_level 4;
    gzip_min_length 256;
    gzip_types application/atom+xml application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;

    location / {
        root   /usr/share/nginx/html;
        index  index.html index.htm;
    }

    location ~ assets\/.*\.(?:css|js|woff2?|svg|gif|map)$ {
        root   /usr/share/nginx/html;
        try_files $uri $uri/ /index.html;
        add_header Cache-Control "max-age=31536000";
        # access_log off;
    }

    #error_page  404              /404.html;

    # redirect server error pages to the static page /50x.html
    #
    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }
}