Skip to content

Instantly share code, notes, and snippets.

@micheleorsi
Created January 22, 2015 10:36
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 micheleorsi/c0e0dbf0a0b16771e67e to your computer and use it in GitHub Desktop.
Save micheleorsi/c0e0dbf0a0b16771e67e to your computer and use it in GitHub Desktop.
configuration file to proxy and cache requests from a backend
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