2

I've a Django application with a directory /media/ for all static files. (css, images, js)

I want to speed up the serving of these files with Apache cache control.

How can I setup cache control for ALL that directory?

UPDATE

I've put this in my /etc/apache2/site-available/mysite.com

 <Directory "/srv/www/mysite.com/myproject/media/">
 Options -Indexes
 Header set Cache-Control "max-age=108000, public"
 </Directory>

But I get this when I try to load my site with Firefox:

enter image description here

What is in Request Heards Cache-Control: max-age=0 ? It is not wrong?

1 Answer 1

2

You could use ExpiresDefault inside <Directory "/path/to/media"> to set cache control to all files within this directory. See mod_expires documentation

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .