[MapProxy] Multiple URLs mapped to same WSGI MP config

Just van den Broecke just at justobjects.nl
Thu Mar 19 11:46:29 PDT 2015


I need to map different URLs to the same WSGI MapProxy app and yaml file 
in Apache. From 
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 

But if I use WSGIApplicationGroup as follows, it works ok:

     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?



More information about the MapProxy mailing list