github.com/minio/minio@v0.0.0-20240328213742-3f72439b8a27/.github/workflows/mint/nginx-8-node.conf (about)

     1  user  nginx;
     2  worker_processes  auto;
     3  
     4  error_log  /var/log/nginx/error.log warn;
     5  pid        /var/run/nginx.pid;
     6  
     7  events {
     8      worker_connections  4096;
     9  }
    10  
    11  http {
    12      include       /etc/nginx/mime.types;
    13      default_type  application/octet-stream;
    14  
    15      log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    16                        '$status $body_bytes_sent "$http_referer" '
    17                        '"$http_user_agent" "$http_x_forwarded_for"';
    18  
    19      access_log  /var/log/nginx/access.log  main;
    20      sendfile        on;
    21      keepalive_timeout  65;
    22  
    23      # include /etc/nginx/conf.d/*.conf;
    24  
    25      upstream minio {
    26          server minio1:9000;
    27          server minio2:9000;
    28          server minio3:9000;
    29          server minio4:9000;
    30          server minio5:9000;
    31          server minio6:9000;
    32          server minio7:9000;
    33          server minio8:9000;
    34      }
    35  
    36      upstream console {
    37          ip_hash;
    38          server minio1:9001;
    39          server minio2:9001;
    40          server minio3:9001;
    41          server minio4:9001;
    42          server minio5:9001;
    43          server minio6:9001;
    44          server minio7:9001;
    45          server minio8:9001;
    46      }
    47  
    48      server {
    49          listen       9000;
    50          listen  [::]:9000;
    51          server_name  localhost;
    52  
    53          # To allow special characters in headers
    54          ignore_invalid_headers off;
    55          # Allow any size file to be uploaded.
    56          # Set to a value such as 1000m; to restrict file size to a specific value
    57          client_max_body_size 0;
    58          # To disable buffering
    59          proxy_buffering off;
    60          proxy_request_buffering off;
    61  
    62          location / {
    63              proxy_set_header Host $http_host;
    64              proxy_set_header X-Real-IP $remote_addr;
    65              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    66              proxy_set_header X-Forwarded-Proto $scheme;
    67  
    68              proxy_connect_timeout 300;
    69              # Default is HTTP/1, keepalive is only enabled in HTTP/1.1
    70              proxy_http_version 1.1;
    71              proxy_set_header Connection "";
    72              chunked_transfer_encoding off;
    73  
    74              proxy_pass http://minio;
    75          }
    76      }
    77  
    78      server {
    79          listen       9001;
    80          listen  [::]:9001;
    81          server_name  localhost;
    82  
    83          # To allow special characters in headers
    84          ignore_invalid_headers off;
    85          # Allow any size file to be uploaded.
    86          # Set to a value such as 1000m; to restrict file size to a specific value
    87          client_max_body_size 0;
    88          # To disable buffering
    89          proxy_buffering off;
    90          proxy_request_buffering off;
    91  
    92          location / {
    93              proxy_set_header Host $http_host;
    94              proxy_set_header X-Real-IP $remote_addr;
    95              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    96              proxy_set_header X-Forwarded-Proto $scheme;
    97              proxy_set_header X-NginX-Proxy true;
    98  
    99              # This is necessary to pass the correct IP to be hashed
   100              real_ip_header X-Real-IP;
   101  
   102              proxy_connect_timeout 300;
   103              
   104              # To support websocket
   105              proxy_http_version 1.1;
   106              proxy_set_header Upgrade $http_upgrade;
   107              proxy_set_header Connection "upgrade";
   108              
   109              chunked_transfer_encoding off;
   110  
   111              proxy_pass http://console;
   112          }
   113      }
   114  }