summaryrefslogtreecommitdiff
path: root/MPE/galaxy-gateway-nginx/conf/nginx.conf
diff options
context:
space:
mode:
Diffstat (limited to 'MPE/galaxy-gateway-nginx/conf/nginx.conf')
-rw-r--r--MPE/galaxy-gateway-nginx/conf/nginx.conf125
1 files changed, 125 insertions, 0 deletions
diff --git a/MPE/galaxy-gateway-nginx/conf/nginx.conf b/MPE/galaxy-gateway-nginx/conf/nginx.conf
new file mode 100644
index 0000000..2e62fa3
--- /dev/null
+++ b/MPE/galaxy-gateway-nginx/conf/nginx.conf
@@ -0,0 +1,125 @@
+worker_processes auto;
+
+events {
+ worker_connections 4096;
+}
+
+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;
+ client_max_body_size 5120M; #(设置客户端请求体最大值)
+ client_body_buffer_size 128k; #(配置请求体缓存区大小,)
+ access_log off; # 关闭access日志
+
+
+ upstream qgwService {
+ server 192.168.20.221:8183;
+ server 192.168.20.222:8183;
+ }
+
+ upstream jobAdmin {
+ server 192.168.20.221:8184;
+ server 192.168.20.222:8184;
+ }
+
+ upstream nacos {
+ server 192.168.20.221:8847;
+ server 192.168.20.222:8847;
+ server 192.168.20.223:8847;
+ }
+
+ upstream druidQuery {
+ server 192.168.20.221:8088 max_fails=3 fail_timeout=30;
+ server 192.168.20.222:8088 max_fails=3 fail_timeout=30;
+ }
+
+#druidQuery节点端口
+ server {
+ listen 8089;
+ server_name localhost;
+ location / {
+ proxy_pass http://druidQuery;
+ proxy_connect_timeout 300s;
+ proxy_send_timeout 300s;
+ proxy_read_timeout 300s;
+ proxy_buffer_size 16k;
+ proxy_buffers 4 32k;
+ proxy_busy_buffers_size 64k;
+ proxy_intercept_errors on;
+ error_page 500 = @retry;
+ }
+ location @retry {
+ proxy_pass http://druidQuery;
+ proxy_connect_timeout 60s;
+ proxy_send_timeout 300s;
+ proxy_read_timeout 300s;
+ proxy_buffer_size 16k;
+ proxy_buffers 4 32k;
+ proxy_busy_buffers_size 64k;
+ }
+ }
+
+#Galaxy-qgw-service转发端口
+ 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压缩标志
+ }
+ }
+
+#galaxy-job-admin界面端口
+ server {
+ listen 8181;
+ server_name localhost;
+ location / {
+ proxy_pass http://jobAdmin;
+ }
+ }
+
+#nacos nacos非加密端口
+ 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;
+ }
+ }
+
+#nacos 加密端口
+ server {
+ listen 8849 ssl;
+ server_name localhost;
+ ssl_certificate /usr/local/nginx/conf/self-sign.crt;
+ ssl_certificate_key /usr/local/nginx/conf/self-sign.key;
+ location / {
+ proxy_pass http://nacos;
+ }
+ }
+
+#nginx监控端口
+ server {
+ listen 9913;
+ server_name localhost;
+ location /status {
+ vhost_traffic_status_display;
+ vhost_traffic_status_display_format html;
+ }
+ }
+
+}