apiVersion: v1
kind: ConfigMap
metadata:
  name: nginx-conf
data:
  nginx.conf: |
    user nginx;
    worker_processes auto;
    error_log /var/log/nginx/error.log crit;
    pid /var/run/nginx.pid;
    events {
        worker_connections 1024;
    }
    http {
        # Basic settings
        sendfile on;
        tcp_nodelay on;
        tcp_nopush on;
        reset_timedout_connection on;
        server_tokens off;
        default_type application/octet-stream;
        include /etc/nginx/mime.types;
        # Cache informations about frequently accessed files
        open_file_cache max=1000 inactive=300s;
        open_file_cache_valid 360s;
        open_file_cache_min_uses 2;
        open_file_cache_errors off;
        # Disable access logs (managed elsewhere)
        access_log off;
        # Proxy buffering settings
        client_max_body_size 0;  # Disabled to allow upload of large files.
        proxy_http_version 1.1;
        proxy_request_buffering off;
        proxy_buffering off;
        # Gzip settings
        gzip on;
        gzip_min_length 10240;
        gzip_comp_level 1;
        gzip_vary on;
        gzip_disable msie6;

        include /etc/nginx/conf.d/*.conf;
    }
