[OSM-dev] problem with apache+mod_tile
Jon Burgess
jburgess777 at googlemail.com
Thu Mar 5 08:54:32 GMT 2009
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]
> I think something is wrong with my render_config.h
> (http://pastie.org/407981) or mod_tile.conf
> (http://pastie.org/407982). Btw, what *should* be the DIRECTORY_HASH
> in render_config.h?? Please help.
You want to enable it, having "#define DIRECTORY_HASH" is sufficient,
you don't need to change this line.
Jon
More information about the dev
mailing list