Last active
December 21, 2017 12:19
-
-
Save fire9/02daf24dcc1988a8f2bd713c7c890d89 to your computer and use it in GitHub Desktop.
proxy forward direction for nginx
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
server { | |
resolver 8.8.8.8; | |
resolver_timeout 5s; | |
listen 8080; | |
access_log /var/logs/nginx/proxy.access.log; | |
error_log /var/logs/nginx/proxy.error.log; | |
location / { | |
proxy_pass $scheme://$host$request_uri; | |
proxy_set_header Host $http_host; | |
proxy_buffers 256 4k; | |
proxy_max_temp_file_size 0; | |
proxy_connect_timeout 30; | |
proxy_cache_valid 200 302 10m; | |
proxy_cache_valid 301 1h; | |
proxy_cache_valid any 1m; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment