Last active
August 29, 2015 13:56
-
-
Save wokamoto/9342751 to your computer and use it in GitHub Desktop.
[Nginx] オレオレ CDN
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 { | |
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