[MapProxy] Setup under Apache and clearing the cache and EPSG issues

Oliver Tonnhofer olt at omniscale.de
Thu Apr 22 07:41:22 EDT 2010

Hi Fabian,

On 22.04.2010, at 11:59, Fabian Schindler wrote:
> First, what steps do I have to perform (or where can I retrieve the  
> information) to start MapProxy from Apache2? Unfortunately the  
> documentation lacks these information and 'Paster' just doesn't  
> fulfill my requirements.
> If I can get help to this topic, I could contribute the  
> documentation for the setup.

You have to create a mysite.wsgi file that loads the paster  
configuration and add that file to you Apache configuration. I have no  
running mod_wsgi configuration where I can copy an example, but it is  
similar to http://code.google.com/p/modwsgi/wiki/IntegrationWithPylons

> Secondly, I would like to know if there is a better way to clear the  
> cache other than to just delete the images in the 'var' folder and  
> the locks in the 'etc' one.

You only need to remove var/cache_data. There is no tool for only  
removing tiles, but the proxy_seed tool can be configured to remove  
all tiles that are older than X days/hours/etc. The seed_tool will  
recreate the tiles though. 0.8.3 will contain a new seed tool, I'll  
look if I can add some --remove-only option.

> My last question is about the EPSG system involved. My previous  
> OpenLayers-Webpage requested images in the EPSG:3035 format, but by  
> using MapProxy I could only access the images in the EPSG:4326  
> format. I've also tried by changing the EPSG-settings in the  
> services.yaml file. Also the images I get in the OpenLayers-Page  
> seem distorted.

You need to add your SRS in the proxy.yaml (wms.srs) and then you  
should be able to request the MapProxy WMS in that SRS. The response  
might look distorted when you cache the data in one SRS and request in  
a completely different SRS (e.g. EPSG:4326 and EPSG:900913). What SRS  
do you use for caching? You can also define multiple SRS to cache.


Oliver Tonnhofer <olt at omniscale.de>
Omniscale - Dominik Helle, Oliver Tonnhofer GbR
Nadorster Str. 60, 26123 Oldenburg
Tel: +49(0)441/9392774-2 (Fax: 9)

More information about the MapProxy mailing list