worker_processes auto; daemon off; error_log stderr notice; pid /var/lib/nginx/nginx.pid; events { worker_connections 1024; } http { include /etc/nginx/mime.types; default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" "$http_x_forwarded_for" ua="$upstream_addr"' ; map $upstream_trailer_grpc_status $grpc_status { default $upstream_trailer_grpc_status; '' $sent_http_grpc_status; } access_log /dev/stdout main; sendfile on; #tcp_nopush on; keepalive_timeout 80; keepalive_requests 300; #gzip on; server_names_hash_max_size 1024; server_names_hash_bucket_size 256; variables_hash_bucket_size 256; variables_hash_max_size 1024; map $request_uri $request_uri_no_args { "~^(?P[^?]*)(\?.*)?$" $path; } map $http_upgrade $connection_upgrade { default upgrade; '' close; } map $http_upgrade $vs_connection_header { default upgrade; '' $default_connection_header; } ssl_protocols TLSv1.2 TLSv1.3; ssl_ciphers "HIGH:!aNULL:!MD5"; server { # required to support the Websocket protocol in VirtualServer/VirtualServerRoutes set $default_connection_header ""; set $resource_type ""; set $resource_name ""; set $resource_namespace ""; set $service ""; listen 80 default_server; listen unix:/var/lib/nginx/passthrough-https.sock ssl default_server proxy_protocol; set_real_ip_from unix:; real_ip_header proxy_protocol; ssl_certificate /etc/nginx/secrets/default; ssl_certificate_key /etc/nginx/secrets/default; server_name _; server_tokens "on"; location / { return 404; } } # stub_status server { listen 8080; allow 127.0.0.1; allow ::1; deny all; location /stub_status { stub_status; } } server { listen unix:/var/lib/nginx/nginx-status.sock; access_log off; location /stub_status { stub_status; } } include /etc/nginx/config-version.conf; include /etc/nginx/conf.d/*.conf; server { listen unix:/var/lib/nginx/nginx-502-server.sock; access_log off; return 502; } server { listen unix:/var/lib/nginx/nginx-418-server.sock; access_log off; return 418; } } stream { log_format stream-main '$remote_addr [$time_local] ' '$protocol $status $bytes_sent $bytes_received ' '$session_time "$ssl_preread_server_name"'; access_log /dev/stdout stream-main; map_hash_bucket_size 512; map_hash_max_size 2048; map $ssl_preread_server_name $dest_internal_passthrough { default unix:/var/lib/nginx/passthrough-https.sock; include /etc/nginx/tls-passthrough-hosts.conf; } server { listen 443; ssl_preread on; proxy_protocol on; proxy_pass $dest_internal_passthrough; } include /etc/nginx/stream-conf.d/*.conf; }