[MapProxy] Multiple URLs mapped to same WSGI MP config
Oliver Tonnhofer
olt at omniscale.de
Mon Mar 23 01:20:15 PDT 2015
Hi Just,
> On 19.03.2015, at 19:46, Just van den Broecke <just at justobjects.nl> wrote:
> I need to map different URLs to the same WSGI MapProxy app and yaml file in Apache. From http://www.mediacore.com/blog/hosting-multiple-wsgi-applications-with-apache I learned that this can be done
> with WSGIApplicationGroup %{GLOBAL}. Otherwise the first URL works ok, but any other URL will trigger an MP error:
>
> ../loader.py", line 1621, in load_configuration_file
> [:error] [pid 20840] ... if 'base' in current_dict:
> [:error] [pid 20840] ... TypeError: argument of type 'NoneType' is not iterable
>
> But if I use WSGIApplicationGroup as follows, it works ok:
>
> WSGIApplicationGroup
> WSGIScriptAlias /guest /var/mapproxy/config.py
> WSGIScriptAlias /user1 /var/mapproxy/config.py
> WSGIScriptAlias /user2 /var/mapproxy/config.py
>
> config.py calls make_wsgi_app() always with the same .yaml file. I use not other WSGI-directives.
>
> The question is: is this a safe thing to do or are there concurrency issues that may pop up at high load? Is this scenario what MultiMapProxy is meant for?
I can’t remember any error reports for running multiple WSGIScriptAlias. But if they all use the same config, maybe you can just start one MapProxy and use some mod_rewrite-fu?
Regards,
Oliver
--
Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.com
OpenStreetMap WMS and tile services | http://maps.omniscale.com
More information about the MapProxy
mailing list