Skip to content

Instantly share code, notes, and snippets.

@yarkovaleksei
Forked from jbutko/bash.sh
Created February 10, 2017 19:26
Show Gist options
  • Save yarkovaleksei/ae81740b8e919556384e0a0bb0f43ac2 to your computer and use it in GitHub Desktop.
Save yarkovaleksei/ae81740b8e919556384e0a0bb0f43ac2 to your computer and use it in GitHub Desktop.
Nginx
# upgrade nginx
sudo add-apt-repository ppa:nginx/stable
sudo apt-get update
sudo apt-get install nginx
# cache
proxy_cache_path /path/to/cache levels=1:2 keys_zone=my_cache:10m max_size=10g
inactive=60m use_temp_path=off;
server {
...
location / {
proxy_cache my_cache;
proxy_pass http://my_upstream;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment