mirror of
https://github.com/jumpserver/helm-charts.git
synced 2025-08-22 00:43:03 +00:00
perf: 优化nginx
This commit is contained in:
parent
c5469d5292
commit
0012d89a82
@ -2,38 +2,10 @@
|
|||||||
{{- $lion := printf "http://%s-%s:%s" (include "jumpserver.fullname" $) "jms-lion" ($.Values.lion.service.web.port | toString) }}
|
{{- $lion := printf "http://%s-%s:%s" (include "jumpserver.fullname" $) "jms-lion" ($.Values.lion.service.web.port | toString) }}
|
||||||
{{- $web := printf "http://%s-%s:%s" (include "jumpserver.fullname" $) "jms-core" ($.Values.core.service.web.port | toString) }}
|
{{- $web := printf "http://%s-%s:%s" (include "jumpserver.fullname" $) "jms-core" ($.Values.core.service.web.port | toString) }}
|
||||||
{{- $ws := printf "http://%s-%s:%s" (include "jumpserver.fullname" $) "jms-core" ($.Values.core.service.ws.port | toString) }}
|
{{- $ws := printf "http://%s-%s:%s" (include "jumpserver.fullname" $) "jms-core" ($.Values.core.service.ws.port | toString) }}
|
||||||
user nginx;
|
|
||||||
worker_processes auto;
|
|
||||||
error_log /var/log/nginx/error.log;
|
|
||||||
pid /run/nginx.pid;
|
|
||||||
|
|
||||||
include /usr/share/nginx/modules/*.conf;
|
|
||||||
|
|
||||||
events {
|
|
||||||
worker_connections 1024;
|
|
||||||
}
|
|
||||||
|
|
||||||
http {
|
|
||||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
|
||||||
'$status $body_bytes_sent "$http_referer" '
|
|
||||||
'"$http_user_agent" "$http_x_forwarded_for" "$upstream_addr"';
|
|
||||||
|
|
||||||
access_log /var/log/nginx/access.log main;
|
|
||||||
# access_log off;
|
|
||||||
|
|
||||||
sendfile on;
|
|
||||||
tcp_nopush on;
|
|
||||||
tcp_nodelay on;
|
|
||||||
keepalive_timeout 65;
|
|
||||||
types_hash_max_size 2048;
|
|
||||||
|
|
||||||
include /etc/nginx/mime.types;
|
|
||||||
default_type application/octet-stream;
|
|
||||||
# include /etc/nginx/conf.d/*.conf;
|
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen {{ $.Values.nginx.service.web.port }};
|
listen {{ $.Values.nginx.service.web.port }};
|
||||||
server_name _;
|
server_name _;
|
||||||
|
server_tokens off;
|
||||||
|
|
||||||
client_max_body_size 4096m; # 录像及文件上传大小限制
|
client_max_body_size 4096m; # 录像及文件上传大小限制
|
||||||
|
|
||||||
@ -101,4 +73,3 @@ http {
|
|||||||
rewrite ^/(.*)$ /ui/$1 last;
|
rewrite ^/(.*)$ /ui/$1 last;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
@ -52,7 +52,7 @@ spec:
|
|||||||
resources:
|
resources:
|
||||||
{{- toYaml .resources | nindent 12 }}
|
{{- toYaml .resources | nindent 12 }}
|
||||||
volumeMounts:
|
volumeMounts:
|
||||||
- mountPath: "/etc/nginx/nginx.conf"
|
- mountPath: "/etc/nginx/conf.d/default.conf"
|
||||||
name: "jms-nginx-config"
|
name: "jms-nginx-config"
|
||||||
subPath: "nginx.conf"
|
subPath: "nginx.conf"
|
||||||
- mountPath: "/opt/jumpserver/data"
|
- mountPath: "/opt/jumpserver/data"
|
||||||
|
Loading…
Reference in New Issue
Block a user