Skip to content

Instantly share code, notes, and snippets.

@wokamoto
Last active August 29, 2015 13:56
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 wokamoto/9342751 to your computer and use it in GitHub Desktop.
Save wokamoto/9342751 to your computer and use it in GitHub Desktop.
[Nginx] オレオレ CDN
server {
listen 80;
location /example.com {
resolver 127.0.0.1;
rewrite ^/example.com/(.+) $1 break;
proxy_cache czone;
proxy_cache_key "$scheme://$host$uri$args";
proxy_set_header Host 'example.com';
proxy_pass http://example.com:80/$1;
proxy_cache_valid 200 365d;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment