TileStache and mod_expires

47 views
Skip to first unread message

shr3k

unread,
Dec 30, 2011, 12:32:45 PM12/30/11
to Tilestache
Hello, is there a option to set TileStache generated images to
something like ExpiresByType image/jpeg A2592000 under mod_wsgi or
mod_python? I'm running mapproxy under mod_wsgi on same server too and
mapproxy requests are 304 cached. TileStache requests are 200.

Here's snip from my apache vhost:
---
WSGIScriptAlias /mapproxy /var/www/client20/web3/mapproxy/mapproxy.py

<Directory "/var/www/client20/web3/mapproxy">
Order allow,deny
Allow from all
</Directory>

#WSGIScriptAlias /tilestache /var/www/client20/web3/tilestache/
tilestache.py

<Directory "/var/www/client20/web3/tilestache">
Order allow,deny
Allow from all
</Directory>

ScriptAlias /tilestache /var/www/client20/web3/tilestache/tiles.py
<Directory /var/www/client20/web3/tilestache>
AddHandler mod_python .py
PythonHandler TileStache::modpythonHandler
PythonOption config /var/www/client20/web3/tilestache/tilestache.cfg
</Directory>
</VirtualHost>
---
and .htacccess:
---
<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault A18000

ExpiresByType image/gif A2592000
ExpiresByType image/jpg A2592000
ExpiresByType image/jpeg A2592000
ExpiresByType image/png A2592000

ExpiresByType text/css A1
ExpiresByType text/javascript A1

ExpiresByType text/html A1
</IfModule>
---

I tried both TileStache configurations, under mod_wsgi and under
mod_python without success - /maproxy requests are 304, /tilecache
requests are 200.
Reply all
Reply to author
Forward
0 new messages