Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: 130c1194e4
Fetching contributors…

Cannot retrieve contributors at this time

28 lines (23 sloc) 936 Bytes
# sample server section for your poor man's CDN
# * <your.ip.address> - your IP address
# * - CDN hostname (not a subdomain of main site!) or IP (to also save time on DNS lookups)
# * - URL of main site so we can redirect there from root
# * /path/to/document/root/ - path to the folder where assets live
server {
listen <your.ip.address>:80;
location / {
rewrite ^ permanent;
location ~* ^.+\.(png|jpg|jpeg|gif|css|js|ico)$ {
root /path/to/document/root/;
expires 1y;
# main rewrite rule to ignore the number in
rewrite ^(.*)\.(\d+)(_m_\d+)?\.([^\.]+)$ $1.$4 last;
gzip on;
gzip_min_length 1000;
gzip_proxied any;
gzip_comp_level 2;
gzip_types text/plain application/xml text/css application/x-javascript text/xml;
Jump to Line
Something went wrong with that request. Please try again.