[MapProxy] Nginx, TMS and missing tiles

Larry Shaffer larrys at dakotacarto.com
Wed Feb 8 19:16:19 EST 2012

Hi Luca,

I'm not following you. Does your configuration work for existing
directory structures? If not, what errors are you seeing?

You can add expire headers with MapProxy and none with Nginx to
differentiate which app served the tile, when you look in response
logs, like in FireBug.

Alternatively, you could seed the cache with single-colored tiles for
existing map tiles (or change existing cached tiles to a single
color), with regular map tiles served from MapProxy. After clearing
all browser caches, you would should then 'see' when tiles were not
being served from the cache, and when they were. (I have not tested
this though.)

Larry Shaffer
Dakota Cartography
Black Hills, South Dakota

On Tue, Feb 7, 2012 at 10:20 AM, Luca Casagrande
<luca.casagrande at gmail.com> wrote:
> On 03/02/2012 13:45, Oliver Tonnhofer wrote:
>> On 03.02.2012, at 13:32, Luca Casagrande wrote:
>>> Thanks for your suggestion, I'll take a look to Varnish.
>>> If the same machine should do also a standard WMS service, it's still
>>> good to use this approach? I though about Nginx for TMS and Apache for WMS,
>>> but I am not sure about this solution.
>> That should be fine. WMS responses don't contain Cache-Controll header, so
>> Varnish shouldn't try to cache WMS responses.
>> Regards,
>> Oliver
> Hello everybody,
> I'm moving on with my "experiments" :)
> Now I'm using MapProxy with Gunicorn and Nginx as a proxy and all is working
> fine, but now I'd like to have Nginx to serve tiles already there.
> This is an approach to this task:
> location ~/tms/1\.0\.0/(.*)_(.*)/(.*)$ {
>              alias /home/luca/mymapproxy/cache_data/$1_cache_$2/$3;
>              add_header X-Static super;
>              try_files $uri @proxy_to_app;
>      }
> Now the problem is to have the same structure; I tried using
> directory_layout: tms but it seems that the output is the same of tc.
> Probably I am missing something about this kind of task.
> Thank you very much for your valuable help
> Luca
> --
> Luca Casagrande
> "I love it when a plan comes together."
> http://www.lucacasagrande.net
> _______________________________________________
> MapProxy mailing list
> MapProxy at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapproxy

More information about the MapProxy mailing list