summarylogtreecommitdiffstats
path: root/sip3-hoof.conf
blob: c1b087f5b35152be85e22c434c30f586694e65c0 (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
map $http_upgrade $connection_upgrade {
    default upgrade;
    ''      close;
}

server {
    listen 80;

    server_name  sip3-hoof;
       
    access_log  /var/log/nginx/sip3-hoof.access.log;
    error_log   /var/log/nginx/sip3-hoof.error.log;

    client_max_body_size       64m;

    gzip on;
    gzip_min_length 1024;
    gzip_proxied expired no-cache no-store private auth;
    gzip_buffers 32 4k;
    gzip_comp_level 9;
    gzip_disable "msie6";
    gzip_http_version 1.1;
    gzip_static on;
    gzip_vary on;
    gzip_types text/css text/javascript text/xml text/plain text/x-component application/javascript application/x-javascript application/json application/xml application/rss+xml font/truetype application/x-font-ttf font/opentype application/vnd.ms-fontobject image/svg+xml;

    root  /srv/http/sip3-hoof;
    index index.html index.htm;

    location / {
      try_files $uri $uri/ /index.html;
    }

    location ~* ^/(bundle|access/.+)\.(gif|ico|jpg|jpeg|jpe|png|svg|svgz|tif|tiff|ttf|woff|woff2|css|js)$ {
      expires 2592000;
      add_header Cache-Control private;
      add_header Cache-Control must-revalidate;
      add_header Pragma private;
      access_log off;
      log_not_found off;
    }

    location /api/ {
      rewrite ^/api/swagger-ui/?$ /api/swagger-ui/index.html permanent;

      proxy_set_header   Host       $host;
      proxy_set_header   X-Real-IP  $remote_addr;
      proxy_set_header   X-Forwarded-For    $proxy_add_x_forwarded_for;
      proxy_set_header   X-Forwarded-Host   $host;
      proxy_set_header   X-Forwarded-Proto  $scheme;

      proxy_pass http://127.0.0.1:8080/api/;
    }
    
    location /grafana {
      proxy_http_version 1.1;
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Upgrade $http_upgrade;
      proxy_set_header Connection $connection_upgrade;
      proxy_set_header Host $http_host;
      proxy_pass http://127.0.0.1:3000;
    }    
}