github.com/minio/minio@v0.0.0-20240328213742-3f72439b8a27/.github/workflows/mint/nginx-1-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      }
    28  
    29      upstream console {
    30          ip_hash;
    31          server minio1:9001;
    32      }
    33  
    34      server {
    35          listen       9000;
    36          listen  [::]:9000;
    37          server_name  localhost;
    38  
    39          # To allow special characters in headers
    40          ignore_invalid_headers off;
    41          # Allow any size file to be uploaded.
    42          # Set to a value such as 1000m; to restrict file size to a specific value
    43          client_max_body_size 0;
    44          # To disable buffering
    45          proxy_buffering off;
    46          proxy_request_buffering off;
    47  
    48          location / {
    49              proxy_set_header Host $http_host;
    50              proxy_set_header X-Real-IP $remote_addr;
    51              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    52              proxy_set_header X-Forwarded-Proto $scheme;
    53  
    54              proxy_connect_timeout 300;
    55              # Default is HTTP/1, keepalive is only enabled in HTTP/1.1
    56              proxy_http_version 1.1;
    57              proxy_set_header Connection "";
    58              chunked_transfer_encoding off;
    59  
    60              proxy_pass http://minio;
    61          }
    62      }
    63  
    64      server {
    65          listen       9001;
    66          listen  [::]:9001;
    67          server_name  localhost;
    68  
    69          # To allow special characters in headers
    70          ignore_invalid_headers off;
    71          # Allow any size file to be uploaded.
    72          # Set to a value such as 1000m; to restrict file size to a specific value
    73          client_max_body_size 0;
    74          # To disable buffering
    75          proxy_buffering off;
    76          proxy_request_buffering off;
    77  
    78          location / {
    79              proxy_set_header Host $http_host;
    80              proxy_set_header X-Real-IP $remote_addr;
    81              proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    82              proxy_set_header X-Forwarded-Proto $scheme;
    83              proxy_set_header X-NginX-Proxy true;
    84  
    85              # This is necessary to pass the correct IP to be hashed
    86              real_ip_header X-Real-IP;
    87  
    88              proxy_connect_timeout 300;
    89              
    90              # To support websocket
    91              proxy_http_version 1.1;
    92              proxy_set_header Upgrade $http_upgrade;
    93              proxy_set_header Connection "upgrade";
    94              
    95              chunked_transfer_encoding off;
    96  
    97              proxy_pass http://console;
    98          }
    99      }
   100  }