Skip to content

Instantly share code, notes, and snippets.

@phillies
Created June 1, 2019 08:50
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 phillies/e8438f68264dbb8cfe7adfa44578b91e to your computer and use it in GitHub Desktop.
Save phillies/e8438f68264dbb8cfe7adfa44578b91e to your computer and use it in GitHub Desktop.
nginx reverse proxy config
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
proxy_cache_path temp levels=1:2 keys_zone=STATIC:10m
inactive=24h max_size=1g;
server {
listen 5000;
location / {
proxy_pass http://myapiserver:5000;
proxy_set_header Host $host;
proxy_buffering on;
proxy_cache STATIC;
proxy_cache_valid 200 1d;
proxy_cache_use_stale error timeout invalid_header updating
http_500 http_502 http_503 http_504;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment