Toto je staršia verzia dokumentu!
Host your own tile cache with Nginx (No more slow cyclosm)
So it all started with ridiculous slowness of the cyclosm.org and underlying 3 tile servers. Average time of load spans between 3 to 15 seconds. There is nothing in the world, that is more annoyting than waiting for tile to load and render. So I said, to hell with it.
First I was searching for some offline map downloader for linux, but struggled to find one. I know for sure there is something out there, but nothing was simple to install and run.
So I setupped nginx, that will serve as a cache and proxy pass. Then I downloaded “Redirector” extension, that will redirect each request that would go to the cyclosm tileserver, to the localhost with the same path. Then nginx will serve image straight from the cache, or will load from the path and from the original tile server.
http {
proxy_cache_path /var/cache/nginx/tiles levels=1:2 keys_zone=tiles_cache:10m max_size=5g inactive=30d use_temp_path=off;
...
}
