[MapProxy] mapproxy behind a reverse proxy and use of X-Script-Name

Milo van der Linden milo at dogodigi.net
Thu Mar 21 15:14:03 PDT 2013


Hello Anne,

It is pretty hard for mapproxy to guess your apache setup :-). I think you
are hoping this can be overrided somewhere within the configuration, but my
gut tells me that would introduce new issues within mapproxy..
Op 21 mrt. 2013 23:06 schreef "Anne Blankert" <anne.blankert at geodan.nl> het
volgende:

> Hello list,
>
> another question...
>
> I want to expose a MapProxy wms service to the internet as follows:
>
> http://servicehost/**mywmsservice <http://servicehost/mywmsservice>
>
> But I have a problem to make getCapabilities produce the correct resource
> URLs
> If I do a request like:
>
> http://servicehost/**mywmsservice?request=**getcapabilities&version=1.1.1&
> **service=wms<http://servicehost/mywmsservice?request=getcapabilities&version=1.1.1&service=wms>
> the resulting getCapabilities is:
>
> ...
> <GetMap>
>         <Format>image/jpeg</Format>
>       <DCPType>
>         <HTTP>
>           <Get><OnlineResource xmlns:xlink="http://www.w3.**org/1999/xlink<http://www.w3.org/1999/xlink>"
> xlink:href="http://**servicehost/mywmsservice/map/**service/<http://servicehost/mywmsservice/map/service/>
> ?"/></Get>
>         </HTTP>
>       </DCPType>
>     </GetMap>
> ...
>
> My problem is that MapProxy adds the suffix "/map/service/" to
> http://servicehost/**mywmsservice <http://servicehost/mywmsservice>
>
> I would like the request-URL to be completely configuration and technology
> independent (not needing such things as mapserver specific map=somemap.map
> parameters or MapProxy specific configuration ("map") or wms service name
> ("service").
>
> I've set up an Apache reverse proxy like this:
>
> <Location /mywmsservice>
>   ProxyPass http://internal_mapproxyhost/**mapproxy/map/service<http://internal_mapproxyhost/mapproxy/map/service>
>   RequestHeader add X-Script-Name /mywmsservice
> </Location>
>
> I had hoped that MapProxy would replace the script_name and path_info part
> of the URL ("/map/service") by the X-Script-Name ("/mywmsservice").
> However, the X-Script-Name is not used as a replacement but as a prefix to
> /map/service (result: "/mywmsservice/map/service")
>
> Is there an easy way to prevent MapProxy from appending "/map/service" to
> the X-Script-Name in the getCapabilities output?
>
> Thanks,
>
> Anne
>
>
>
> --
> ------------------------------**--------
> *Geodan*
> President Kennedylaan 1
> 1079 MB Amsterdam (NL)
>
> T +31 (0)20 - 5711 311
> E anne.blankert at geodan.nl
> www.geodan.nl <http://www.geodan.nl/> | disclaimer <http://www.geodan.nl/*
> *disclaimer <http://www.geodan.nl/disclaimer>>
> ------------------------------**--------
>
>
> ______________________________**_________________
> MapProxy mailing list
> MapProxy at lists.osgeo.org
> http://lists.osgeo.org/**mailman/listinfo/mapproxy<http://lists.osgeo.org/mailman/listinfo/mapproxy>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapproxy/attachments/20130321/04bf0223/attachment.html>


More information about the MapProxy mailing list