Skip to content

Instantly share code, notes, and snippets.

@Yinchie
Last active January 6, 2017 22:43
Show Gist options
  • Save Yinchie/cff58fddfa6499bae9530fa8ee142d61 to your computer and use it in GitHub Desktop.
Save Yinchie/cff58fddfa6499bae9530fa8ee142d61 to your computer and use it in GitHub Desktop.
Nginx proxy config for each location /
proxy_hide_header Server;
proxy_hide_header X-Powered-By;
proxy_hide_header Etag;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Accept-Encoding ""; # no backend compression
proxy_set_header Proxy ""; # Fix HTTPoxy Vulnerability.
proxy_set_header Cookie "";
proxy_connect_timeout 90;
proxy_send_timeout 90;
proxy_read_timeout 90;
proxy_http_version 1.1;
proxy_set_header Connection "";
proxy_buffering on;
proxy_buffer_size 1k;
proxy_buffers 24 4k;
proxy_busy_buffers_size 8k;
proxy_max_temp_file_size 2048m;
proxy_temp_file_write_size 32k;
proxy_redirect off;
proxy_pass http://ghost;
keepalive_disable none;
keepalive_requests 300;
keepalive_timeout 300s;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment