Welcome! Log In Create A New Profile

Advanced

Header cache control for CDN

February 25, 2011 06:23AM
hi i try to setup akamai cdn i upload all my pictures to CDN server and all pictures point out from my website to CDN everything allright but they let me put upto 3 days ttl time of images, when i go www.webpagetest.org the site always warning that because is not 30days the address something like http://www.cdntechnologies.com/adsa.34a/mypicture.png i want this picture expire time to be 30days one of my friend told me can't override because you dont hold images others says you can but dont know how to do my conf something like


if ($myrewrite = "AB")
{
rewrite /(.+)(style|lightbox)\.css$ /$2.css last;
rewrite /(.*)(userdata|install|addon|cron\/)(.*)$ /$2$3 last;
rewrite /(.*)(js\/)(.*)$ /$2$3$4 last;
rewrite ^/(.*)(index\.php)(\/?)(.*)$ /index.php?page=index/$4 last;
rewrite /(.*)(images\/)(.*)(\.)(gif|jpe?g|png|ico)$ /$2$3$4$5 last;
rewrite ^/(.*)$ /index.php?page=$1 last;

}


location ~ /\.ht { deny all; }
location ~ /(userdata|images)/ {
gzip on;
gzip_min_length 512;
gzip_types application/xml text/css application/x-javascript text/javascript;
gzip_proxied any;
gzip_http_version 1.0;
root $home_dir/www/;
access_log off;
expires 30d;
}


thanks in advance
Subject Author Posted

Header cache control for CDN

lifeisjustabout February 25, 2011 06:23AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 245
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready