github.com/minio/minio@v0.0.0-20240328213742-3f72439b8a27/buildscripts/upgrade-tests/nginx.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  
     8  events {
     9      worker_connections  1024;
    10  }
    11  
    12  
    13  http {
    14      include       /etc/nginx/mime.types;
    15      default_type  application/octet-stream;
    16  
    17      log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
    18                        '$status $body_bytes_sent "$http_referer" '
    19                        '"$http_user_agent" "$http_x_forwarded_for"';
    20  
    21      access_log  /var/log/nginx/access.log  main;
    22  
    23      sendfile        on;
    24      #tcp_nopush     on;
    25  
    26      keepalive_timeout  65;
    27  
    28      #gzip  on;
    29  
    30      # include /etc/nginx/conf.d/*.conf;
    31  
    32      upstream minio {
    33          server minio1:9000;
    34          server minio2:9000;
    35          server minio3:9000;
    36          server minio4:9000;
    37      }
    38  
    39      # main minio
    40      server {
    41          listen       9000;
    42          listen  [::]:9000;
    43          server_name  localhost;
    44  
    45           # To allow special characters in headers
    46           ignore_invalid_headers off;
    47           # Allow any size file to be uploaded.
    48           # Set to a value such as 1000m; to restrict file size to a specific value
    49           client_max_body_size 0;
    50           # To disable buffering
    51           proxy_buffering off;
    52  
    53          location / {
    54              proxy_set_header Host $http_host;
    55              proxy_set_header X-Real-IP $remote_addr;
    56              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    57              proxy_set_header X-Forwarded-Proto $scheme;
    58  
    59              proxy_connect_timeout 300;
    60              # Default is HTTP/1, keepalive is only enabled in HTTP/1.1
    61              proxy_http_version 1.1;
    62              proxy_set_header Connection "";
    63              chunked_transfer_encoding off;
    64  
    65              proxy_pass http://minio;
    66          }
    67      }
    68  }