Created
January 22, 2015 10:36
-
-
Save micheleorsi/c0e0dbf0a0b16771e67e to your computer and use it in GitHub Desktop.
configuration file to proxy and cache requests from a backend
This file contains hidden or 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 4; | |
events { | |
worker_connections 1024; | |
} | |
http { | |
## | |
# Basic Settings | |
## | |
#backend | |
proxy_cache_path /home/ubuntu/cache_root keys_zone=one:10m loader_threshold=300 loader_files=200 max_size=200m; | |
server { | |
listen 80; | |
proxy_cache one; | |
location / { | |
proxy_pass http://<backend-url>; | |
} | |
} | |
## | |
# Logging Settings | |
## | |
access_log /var/log/nginx/access.log; | |
error_log /var/log/nginx/error.log; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment