Created
June 1, 2019 08:50
-
-
Save phillies/e8438f68264dbb8cfe7adfa44578b91e to your computer and use it in GitHub Desktop.
nginx reverse proxy config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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