[MapProxy] Multiple URLs mapped to same WSGI MP config
Just van den Broecke
just at justobjects.nl
Tue Mar 24 05:14:29 PDT 2015
Hi Oliver,
My setting should read WSGIApplicationGroup %{GLOBAL}.
On 23-03-15 09:20, Oliver Tonnhofer wrote:
> 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?
Yes, thought of rewrites, can revisit. In any case I want to make sure
that any info responses like WMS GetCapabilities and TMS caps has the
original user's request path embedded in various embedded links.
WSGIScriptAliasMatch is an option but discouraged by the author.
Best,
Just
>
>
> Regards,
> Oliver
>
More information about the MapProxy
mailing list