aboutsummaryrefslogtreecommitdiffstats
path: root/csit.infra.dash/nginx/conf.d/default.conf
blob: 3670c1f548250c45a3af4e90418841cac41cf6b4 (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
upstream minio {
  server        minio:9000;
}

server_names_hash_bucket_size 512;

server {
  listen        80;
  listen        443 ssl;

  ssl_certificate       /etc/nginx/certs/subdomains.amazonaws.com.crt;
  ssl_certificate_key   /etc/nginx/certs/subdomains.amazonaws.com.key;

  server_name ~^(?<bucketname>.+)\.s3\.amazonaws\.com$;

  location / {
    proxy_pass  http://minio/$bucketname/$request_uri;
  }
}

server {
  listen        80;
  listen        443 ssl default_server;

  ssl_certificate       /etc/nginx/certs/subdomains.amazonaws.com.crt;
  ssl_certificate_key   /etc/nginx/certs/subdomains.amazonaws.com.key;

  server_name _;

  location / {
    proxy_pass  http://minio;
  }
}