- 无状态nginx配置
- nginx.conf覆盖容器配置
nginx.conf 代码: 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"'; access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log; sendfile on; #tcp_nopush on; keepalive_timeout 65; #gzip on; include /etc/nginx/conf.d/*.conf; # C++网关 server { listen 30001; add_header Strict-Transport-Security "max-age=31536000; includeSubDomains"; add_header X-XSS-Protection "1; mode=block"; add_header X-Frame-Options "SAMEORIGIN always"; add_header X-Content-Type-Options "nosniff"; # 转发websocket需要的设置 proxy_set_header X-Real_IP $remote_addr; proxy_set_header Host $host; proxy_set_header X_Forward_For $proxy_add_x_forwarded_for; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; location / { proxy_set_header Connection 'keep-alive'; proxy_read_timeout 6000; proxy_pass http://gatewayserver.rz-dt:30001/; } location /weixin/ { proxy_pass http://ossaccessserver.rz-dt:30002/weixin/; } location /upload/ { client_max_body_size 1024M; client_body_buffer_size 1024M; proxy_pass http://fileserver.rz-dt:30001/upload/; } location /events/ { proxy_pass http://sseserver.rz-dt:30001/events/; } location /getEsignSignUrl/ { proxy_pass http://fileserver.rz-dt:30001/getEsignSignUrl/; } location /public/ { proxy_pass http://sseserver.rz-dt:30001/public/; } location /clean_download/ { proxy_pass http://fileserver.rz-dt:30001/clean_download/; } location /clean_download_data/ { proxy_pass http://fileserver.rz-dt:30001/clean_download_data/; } location /getOssSignUrl/ { client_max_body_size 1024M; client_body_buffer_size 1024M; proxy_pass http://fileserver.rz-dt:30001/getOssSignUrl/; } location /getStsToken/ { client_max_body_size 1024M; client_body_buffer_size 1024M; proxy_pass http://fileserver.rz-dt:30001/getStsToken/; } location /getPreviewUrl/ { client_max_body_size 1024M; client_body_buffer_size 1024M; proxy_pass http://fileserver.rz-dt:30001/getPreviewUrl/; } location /change_image_background_color/ { client_max_body_size 1024M; client_body_buffer_size 1024M; proxy_pass http://fileserver.rz-dt:30001/change_image_background_color/; } location /docx2pdf/ { client_max_body_size 50M; client_body_buffer_size 50M; proxy_pass http://fileserver.rz-dt:30001/docx2pdf/; } location /getPdfP
k8s nginx.conf配置文件配置
于 2024-06-12 16:38:43 首次发布