[MapProxy] MultiMap deployment
Oliver Tonnhofer
olt at omniscale.de
Tue Aug 23 09:21:25 EDT 2011
On 23.08.2011, at 14:31, Jorge Gaspar Sanz Salinas wrote:
> I'm having troubles exposing a MapProxy (1.2.0b1) using gunicorn through
> a reverse proxy.
>
> When I access gunicorn directly everything runs fine but accessing
> through apache or nginx are having some problems with the script_name
> and path_info.
>
> OK with nginx I have this configuration:
>
> location /mapproxy {
> proxy_pass http://localhost:8080; #gunicorn
> proxy_set_header Host $http_host;
> proxy_set_header X-Script-Name /mapproxy;
> }
Right, thats the correct setup. The X-Script-Name tells MapProxy that all URLs need to start with /mapproxy and the Host that all URLs should use the hostname of the frontend proxy and not localhost:8080.
> The result is that mapproxy runs well except for some urls not well
> writen on the output HTML.
>
> For example when I access to http://server/mapproxy/conf1/
>
> The demo link is http://server/mapproxy/demo/ instead of
> http://server/mapproxy/conf1/demo/
Ok, thats a bug related to the use of MultiMapProxy. I fixed that.
> On Apache reverse proxy (mod_proxy) I had a similar problem (I got
> http://server/conf1/demo/).
You need to pass that X-Script-Header to MapProxy. Maybe mod_headers can do that? I don't know much about Apache, but maybe someone else knows how to do this.
Regards,
Oliver
--
Oliver Tonnhofer | Omniscale GmbH & Co KG | http://omniscale.de
http://mapproxy.org | https://bitbucket.org/olt | @oltonn
More information about the MapProxy
mailing list