From f97919e1da65b3510cea2c7ccb656a278a53518e Mon Sep 17 00:00:00 2001 From: "leon.li" Date: Wed, 24 Aug 2016 11:32:02 +0800 Subject: [PATCH] Dengine: add nginx cones --- Dengine/conf/nginx_status.conf | 51 ++++++++++++++++++++++++++++++++++ Dengine/conf/proxy.conf | 24 ++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 Dengine/conf/nginx_status.conf create mode 100644 Dengine/conf/proxy.conf diff --git a/Dengine/conf/nginx_status.conf b/Dengine/conf/nginx_status.conf new file mode 100644 index 0000000..1bd7b05 --- /dev/null +++ b/Dengine/conf/nginx_status.conf @@ -0,0 +1,51 @@ +req_status_zone server "$host:$server_addr:$server_port" 10M; +check_shm_size 50M; +req_status server; + +server { + listen 6666; + server_name aaabbbccc; + + location /status { + check_status; + access_log off; + # deny all; + } + + location /degrade{ + upstream_degrade_interface; + access_log off; + # deny all; + } + + location / { + return 444; + } +} + +server { + listen 80 default_server; + server_name aaabbbccc; + + location /status { + echo "ok"; + default_type text/plain; + access_log off; + # deny all; + } + + location /reqstatus { + req_status_show; + access_log off; + # deny all; + } + + location / { + return 444; + } + + error_page 404 403 =444 @static; + location @static{ + return 444; + } +} diff --git a/Dengine/conf/proxy.conf b/Dengine/conf/proxy.conf new file mode 100644 index 0000000..1b4a198 --- /dev/null +++ b/Dengine/conf/proxy.conf @@ -0,0 +1,24 @@ + proxy_upstream_tries 2; + server_info off; + proxy_redirect off; + proxy_set_header Host $host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + client_max_body_size 20m; + client_body_buffer_size 256k; + proxy_connect_timeout 90; + proxy_send_timeout 90; + proxy_read_timeout 90; + proxy_buffer_size 128k; + proxy_buffers 4 64k; + proxy_busy_buffers_size 128k; + proxy_temp_file_write_size 128k; + proxy_http_version 1.1; + proxy_set_header Connection ""; + + dypp_key_generate off; + upstream_degrade_shm_size 20M; + upstream_degrade_rate 40; + + #数据到达一定大小flush + flush_buffer_size 10k;