Created
November 4, 2013 23:41
-
-
Save jimaek/7311355 to your computer and use it in GitHub Desktop.
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
proxy_cache_path /var/cache/nginx levels=2 keys_zone=my_diskcached:50m inactive=365d max_size=7g; | |
server { | |
listen 80; | |
server_name cdn.jsdelivr.net HOSTNAME.jsdelivr.net; | |
location / { | |
access_log off; | |
gzip on; | |
gzip_min_length 100; | |
gzip_types text/plain text/xml application/xml text/css text/javascript application/javascript application/x-javascript text/x-component application/json application/xhtml+xml application/rss+xml application/atom+xml application/vnd.ms-fontobject image/svg+xml application/x-font-ttf font/opentype; | |
gzip_comp_level 4; | |
gzip_disable "MSIE [1-6]\."; | |
expires 365d; | |
proxy_set_header Host cdn.jsdelivr.net; | |
proxy_set_header If-None-Match ""; | |
proxy_set_header If-Modified-Since ""; | |
add_header POP HOSTNAME; | |
proxy_ignore_headers Expires; | |
proxy_ignore_headers Set-Cookie; | |
set $backend jsdelivr3.dak.netdna-cdn.com; | |
proxy_pass http://$backend$request_uri; | |
proxy_pass_header P3P; | |
proxy_cache_min_uses 4; | |
proxy_cache my_diskcached; | |
proxy_cache_valid 200 365d; | |
proxy_cache_use_stale error timeout invalid_header updating http_502; | |
proxy_cache_key jsdelivr.dak0$uri$is_args$args; | |
} | |
location /nginx_status { | |
stub_status on; | |
access_log off; | |
allow all; | |
} | |
} | |
server { | |
listen 443 ssl; | |
server_name cdn.jsdelivr.net HOSTNAME.jsdelivr.net; | |
ssl on; | |
ssl_certificate /etc/nginx/ssl/jsdelivr.pem; | |
ssl_certificate_key /etc/nginx/ssl/jsdelivr.key; | |
location / { | |
access_log off; | |
gzip on; | |
gzip_min_length 100; | |
gzip_types text/plain text/xml application/xml text/css text/javascript application/javascript application/x-javascript text/x-component application/json application/xhtml+xml application/rss+xml application/atom+xml application/vnd.ms-fontobject image/svg+xml application/x-font-ttf font/opentype; | |
gzip_comp_level 4; | |
gzip_disable "MSIE [1-6]\."; | |
expires 365d; | |
proxy_set_header Host cdn.jsdelivr.net; | |
proxy_set_header If-None-Match ""; | |
proxy_set_header If-Modified-Since ""; | |
add_header POP HOSTNAME; | |
proxy_ignore_headers Expires; | |
proxy_ignore_headers Set-Cookie; | |
set $backend jsdelivr3.dak.netdna-cdn.com; | |
proxy_pass http://$backend$request_uri; | |
proxy_pass_header P3P; | |
proxy_cache_min_uses 4; | |
proxy_cache my_diskcached; | |
proxy_cache_valid 200 365d; | |
proxy_cache_use_stale error timeout invalid_header updating http_502; | |
proxy_cache_key jsdelivr.dak0$uri$is_args$args; | |
} | |
location /nginx_status { | |
stub_status on; | |
access_log off; | |
allow all; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment