diff options
Diffstat (limited to 'parcels/roles/services/galaxy-gateway-nginx/templates/2106/nginx.conf.j2')
| -rw-r--r-- | parcels/roles/services/galaxy-gateway-nginx/templates/2106/nginx.conf.j2 | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/parcels/roles/services/galaxy-gateway-nginx/templates/2106/nginx.conf.j2 b/parcels/roles/services/galaxy-gateway-nginx/templates/2106/nginx.conf.j2 new file mode 100644 index 0000000..ef5461b --- /dev/null +++ b/parcels/roles/services/galaxy-gateway-nginx/templates/2106/nginx.conf.j2 @@ -0,0 +1,101 @@ +worker_processes 4; + +events { + worker_connections 1024; +} + +http { + + include mime.types; + default_type application/octet-stream; + sendfile on; + keepalive_timeout 65; + vhost_traffic_status_zone; + vhost_traffic_status_filter_by_host on; + + upstream qgwService { +{% for dev_info in ansible_play_hosts %} + server {{dev_info}}:8183; +{% endfor %} + } + + upstream jobAdmin { +{% for dev_info in ansible_play_hosts %} + server {{dev_info}}:8184; +{% endfor %} + } + + upstream druidQuery { + server {{ groups.druid[0] }}:8088; + server {{ groups.druid[1] }}:8088; + } + + upstream nacos { +{% for dev_info in groups.nacos %} + server {{dev_info}}:8847; +{% endfor %} + } + + server { + listen 9999; + server_name localhost; + + location / { + + proxy_pass http://qgwService; #请求转发到查询引擎集群 + + proxy_http_version 1.1; #指定使用http1.1版本 + + proxy_read_timeout 21600; #等待后端服务响应的最大时长 + + gzip on; #开启压缩 + + gzip_comp_level 6; #压缩级别 + + gzip_min_length 1k; #启用gzip压缩的最小文件,小于设置值的文件将不会压缩 + + gzip_types application/json; #压缩文件类型 + + gzip_vary on; #是否传输gzip压缩标志 + + } + } + + server { + listen 8181; + server_name localhost; + location / { + proxy_pass http://jobAdmin; + } + } + + server { + listen 8089; + server_name localhost; + location / { + proxy_pass http://druidQuery; + } + } + + server { + listen 8848; + server_name localhost; + location / { + proxy_pass http://nacos; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header REMOTE-HOST $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + } + } + + server { + listen 9913; + server_name localhost; + location /status { + vhost_traffic_status_display; + vhost_traffic_status_display_format html; + } + + } + +} |
