Skip to content

Instantly share code, notes, and snippets.

@emacsist
Created May 31, 2018 08:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save emacsist/800699495f2e5fbe62e5952a77fe16fb to your computer and use it in GitHub Desktop.
Save emacsist/800699495f2e5fbe62e5952a77fe16fb to your computer and use it in GitHub Desktop.
#user nobody;
worker_processes auto;
worker_cpu_affinity auto;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
use epoll; # add on 2016-06-21
worker_connections 4096; # 1024 to 2048 2016-06-21
multi_accept on; # add on 2016-06-21
}
http {
lua_shared_dict access 10m;
server {
listen 82;
server_name localhost;
location /domain_status {
#return "500";
default_type text/plain;
content_by_lua_file conf/domain_status.lua;
}
location /nginx_status {
stub_status on;
access_log off;
}
location /bid {
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_pass http://dsp_bid;
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 10m;
client_body_buffer_size 512k;
#proxy_connect_timeout 2s;
#proxy_send_timeout 2s;
#proxy_read_timeout 2s;
proxy_buffer_size 256k;
proxy_buffers 4 256k;
proxy_busy_buffers_size 512k;
proxy_temp_file_write_size 512k;
lua_need_request_body on;
log_by_lua_file conf/log_access.lua;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment