[OSM-dev] problem with apache+mod_tile

Arindam Ghosh makghosh at gmail.com
Thu Mar 5 15:56:07 GMT 2009


Hi

On Thu, Mar 5, 2009 at 2:24 PM, Jon Burgess <jburgess777 at googlemail.com> wrote:
> On Thu, 2009-03-05 at 10:35 +0530, Arindam Ghosh wrote:
>> Hi all
>>
>> While setting up the osm-india instance in freemap.in, i built and
>> installed mod_tile, mapnik all well.
>>
>> Also, on running 'rendered' and restarting apache i am getting world
>> map at http://tile.freemap.in/osm_tiles2/0/0/0.png
>>
>> But rails server can't seem to find the tiles. I have changed the
>> lookup url's to [abc].tile.freemap.in in OpenStreetMap.js. The apache
>> error.log when its' rails is trying to fetch the tiles is given:
>> [http://pastie.org/407979]
>
> You can either change the URL in the javascript to include
> the /osm_tiles2/ part of the URL, or you can use mod_rewrite to fix it
> on the server. The live OSM server uses the rewrite rules because
> historically people have been using a variety of different URLs to
> access the tiles:
>
>        RewriteEngine on
>
>        RewriteRule ^/([0-9]+)/([0-9]+)/([0-9]+).png/status  /osm_tiles2/$1/$2/$3.png/status [PT,T=text/plain]
>        RewriteRule ^/([0-9]+)/([0-9]+)/([0-9]+).png/dirty   /osm_tiles2/$1/$2/$3.png/dirty  [PT,T=text/plain]
>
>        RewriteRule ^//?(-?[0-9]+)/(-?[0-9]+)/(-?[0-9]+).png               /osm_tiles2/$1/$2/$3.png   [PT,T=image/png]
>        RewriteRule ^//?mapnik//?(-?[0-9]+)/(-?[0-9]+)/(-?[0-9]+).png        /osm_tiles2/$1/$2/$3.png   [PT,T=image/png]
>        RewriteRule ^//?mapnik_tiles//?(-?[0-9]+)/(-?[0-9]+)/(-?[0-9]+).png  /osm_tiles2/$1/$2/$3.png   [PT,T=image/png]
>

This worked perfectly...thanks jon!

--Arindam




More information about the dev mailing list