[Tile-serving] New option for tile server: Nginx+Tirex

OldGreyCells oldgreycells at gmail.com
Thu May 23 16:42:43 UTC 2013


Hi Hiroshi

Not sure if this is relevant to your project, but nginx will allow you 
to create a tilecache really, really easily.

In your sites-enabled config file:

proxy_cache_path /var/www/tilecache/osm levels=1:2:2 
keys_zone=tilecache:64m max_size=500m;

upstream osm_tiles {
   server a.tile.openstreetmap.org;
   server b.tile.openstreetmap.org;
   server c.tile.openstreetmap.org;
}

server {
   listen <your.ip.address:80;
   server_name your.tile.domain.com;

   location / {
     proxy_pass http://osm_tiles/;
     proxy_cache tilecache;
     proxy_cache_key "$scheme$host$request_uri";
     proxy_cache_valid 200 302 300h;
     proxy_cache_valid 404 1m;
   }
}

HTH



On 23/05/13 00:58, Hiroshi Miura(@osmf) wrote:
>
> On 2013年05月23日 02:16, Paul Norman wrote:
>>> From: Hiroshi Miura(@osmf) [mailto:miurahr at osmf.jp]
>>>
>>> You are always welcome to join, as same as other project, forking,
>>> hacking and pull requesting on
>>>
>>> https://github.com/osmfj/tilecache
>> Is this related to the existing tilecache software at http://www.tilecache.org/? If not, might I suggest a different name?
>>
>
>   It is not related to tilecache.org.  Sorry if you are confused.
>
> At first, I'm intended to build a cache server for tile CDN, so I named it 'tilecache' on our repository.
> And then, extend it as tile server recipe.
> After a month, there are over 300 lines of tirex driver code.
>
> A renaming  is one of issues for the project.
> Do you have any suggestion?
>
>
> FYI: It has three types of snippets.
>
> First is a core lua code to connect and drive tirex from nginx.
>        https://github.com/osmfj/tilecache/tree/master/nginx/script
>
> Second is a configuration for OSM japan tile server
>    and several typical examples of Nginx configuration using core components.
>         https://github.com/osmfj/tilecache/tree/master/nginx/sites
>
> Third one is  an utility script to import planet data, update and expire tiles.
>          https://github.com/osmfj/tilecache/tree/master/updatedb
>
>
> Hiroshi
>
>
> _______________________________________________
> Tile-serving mailing list
> Tile-serving at openstreetmap.org
> http://lists.openstreetmap.org/listinfo/tile-serving
>



More information about the Tile-serving mailing list