Re: Mapserver behind proxyserver

"Rahkonen Jukka (MML)" <[email protected]> Wed, 9 Oct 2019 12:13:30 +0000
Newsgroups gmane.comp.gis.mapserver.user
Message-ID <[email protected]>
--===============1679766825788914317==
Content-Language: fi-FI
Content-Type: multipart/alternative;
	boundary="_000_e937f17d6c7748e3872e7aee5cf719b6C119S212VM042msvyvivaha_"

--_000_e937f17d6c7748e3872e7aee5cf719b6C119S212VM042msvyvivaha_
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi,

See https://mapserver.org/ogc/wfs_server.html
You should have full control on the service URL by having  "wfs_service_onl=
ineresource" set in the metadata section.

-Jukka Rahkonen-


L=E4hett=E4j=E4: mapserver-users <[email protected]> =
Puolesta Kler, Tijs de
L=E4hetetty: keskiviikko 9. lokakuuta 2019 13.41
Vastaanottaja: [email protected]
Aihe: [mapserver-users] Mapserver behind proxyserver

Hey All,

I am running a mapserver docker container on port 80 using the following do=
cker image: https://github.com/PDOK/mapserver-wfs-postgis.

For deployment i have to run behind a proxyserver based on HAproxy that tak=
es care of ssl encryption.
Accessing GetCapabilites (https://acc.dsr.maps.amsterdam.nl/mapserver/wfs?R=
EQUEST=3DGetCapabilities&SERVICE=3Dwfs) resolves and returns xml with the a=
vailable layers.
The layers however contains url references to port 80:
> https://acc.dsr.maps.amsterdam.nl:80/mapserver?request=3DGetMetadata&laye=
r=3DInvloedsgebied_Metro

How does mapserver build the layer urls?
Does it use the request header of the GetCapabilities request to construct =
it? Or serverside configuration?
And if yes, which header fields or environment/config variables are used to=
 construct the layer URL?

Cheers,
Tijs



De gemeente Amsterdam streeft naar optimale dienstverlening en zorgvuldige =
afhandeling van e-mailverkeer. Als een e-mail niet voor u is bestemd, verzo=
ekt de gemeente u vriendelijk ons van de juiste adressering op de hoogte te=
 stellen en de e-mail te verwijderen zonder de informatie te gebruiken en t=
e delen met anderen. Voor verdere informatie over de rechten op informatie,=
 zie https://www.amsterdam.nl/proclaimer.

--_000_e937f17d6c7748e3872e7aee5cf719b6C119S212VM042msvyvivaha_
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<html xmlns:v=3D"urn:schemas-microsoft-com:vml" xmlns:o=3D"urn:schemas-micr=
osoft-com:office:office" xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" xmlns=3D"http:=
//www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=3D"Content-Type" content=3D"text/html; charset=3Diso-8859-=
1">
<meta name=3D"Generator" content=3D"Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
	{font-family:"Cambria Math";
	panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
	{font-family:Calibri;
	panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
	{font-family:Corbel;
	panose-1:2 11 5 3 2 2 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;
	mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
	{mso-style-priority:99;
	color:#0563C1;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{mso-style-priority:99;
	color:#954F72;
	text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
	{mso-style-name:msonormal;
	mso-margin-top-alt:auto;
	margin-right:0cm;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	font-size:11.0pt;
	font-family:"Calibri",sans-serif;}
span.Shkpostityyli18
	{mso-style-type:personal;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
span.Shkpostityyli21
	{mso-style-type:personal-reply;
	font-family:"Calibri",sans-serif;
	color:windowtext;}
.MsoChpDefault
	{mso-style-type:export-only;
	font-size:10.0pt;}
@page WordSection1
	{size:612.0pt 792.0pt;
	margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
	{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext=3D"edit" spidmax=3D"1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext=3D"edit">
<o:idmap v:ext=3D"edit" data=3D"1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=3D"FI" link=3D"#0563C1" vlink=3D"#954F72">
<div class=3D"WordSection1">
<p class=3D"MsoNormal">Hi,<o:p></o:p></p>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">See <a href=3D"https://mapserve=
r.org/ogc/wfs_server.html">
https://mapserver.org/ogc/wfs_server.html</a><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">You should have full control on=
 the service URL by having &nbsp;&#8220;wfs_service_onlineresource&#8221; s=
et in the metadata section.<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">-Jukka Rahkonen-<o:p></o:p></sp=
an></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<div>
<div style=3D"border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm =
0cm 0cm">
<p class=3D"MsoNormal"><b><span style=3D"mso-fareast-language:FI">L=E4hett=
=E4j=E4:</span></b><span style=3D"mso-fareast-language:FI"> mapserver-users=
 &lt;[email protected]&gt;
<b>Puolesta </b>Kler, Tijs de<br>
<b>L=E4hetetty:</b> keskiviikko 9. lokakuuta 2019 13.41<br>
<b>Vastaanottaja:</b> [email protected]<br>
<b>Aihe:</b> [mapserver-users] Mapserver behind proxyserver<o:p></o:p></spa=
n></p>
</div>
</div>
<p class=3D"MsoNormal"><o:p>&nbsp;</o:p></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">Hey All, <o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">I am running a mapserver docker=
 container on port 80 using the following docker image:
<a href=3D"https://github.com/PDOK/mapserver-wfs-postgis">https://github.co=
m/PDOK/mapserver-wfs-postgis</a>.
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">For deployment i have to run be=
hind a proxyserver based on HAproxy that takes care of ssl encryption.
<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">Accessing GetCapabilites (<a hr=
ef=3D"https://acc.dsr.maps.amsterdam.nl/mapserver/wfs?REQUEST=3DGetCapabili=
ties&amp;SERVICE=3Dwfs">https://acc.dsr.maps.amsterdam.nl/mapserver/wfs?REQ=
UEST=3DGetCapabilities&amp;SERVICE=3Dwfs</a>) resolves
 and returns xml with the available layers. <o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">The layers however contains url=
 references to port 80:<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">&gt; <a href=3D"https://acc.dsr=
.maps.amsterdam.nl:80/mapserver?request=3DGetMetadata&amp;layer=3DInvloedsg=
ebied_Metro">
https://acc.dsr.maps.amsterdam.nl:80/mapserver?request=3DGetMetadata&amp;la=
yer=3DInvloedsgebied_Metro</a><o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">How does mapserver build the la=
yer urls?<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">Does it use the request header =
of the GetCapabilities request to construct it? Or serverside configuration=
?<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">And if yes, which header fields=
 or environment/config variables are used to construct the layer URL?<o:p><=
/o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US"><o:p>&nbsp;</o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">Cheers,<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"EN-US">Tijs<o:p></o:p></span></p>
<p class=3D"MsoNormal"><span lang=3D"NL" style=3D"mso-fareast-language:FI">=
<br>
<br>
<o:p></o:p></span></p>
<p style=3D"margin-bottom:12.0pt"><span lang=3D"NL" style=3D"font-size:9.0p=
t;font-family:&quot;Corbel&quot;,sans-serif"><br>
De gemeente Amsterdam streeft naar optimale dienstverlening en zorgvuldige =
afhandeling van e-mailverkeer. Als een e-mail niet voor u is bestemd, verzo=
ekt de gemeente u vriendelijk ons van de juiste adressering op de hoogte te=
 stellen en de e-mail te verwijderen
 zonder de informatie te gebruiken en te delen met anderen. Voor verdere in=
formatie over de rechten op informatie, zie
<a href=3D"https://www.amsterdam.nl/proclaimer">https://www.amsterdam.nl/pr=
oclaimer</a>.<o:p></o:p></span></p>
</div>
</body>
</html>

--_000_e937f17d6c7748e3872e7aee5cf719b6C119S212VM042msvyvivaha_--

--===============1679766825788914317==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KbWFwc2VydmVy
LXVzZXJzIG1haWxpbmcgbGlzdAptYXBzZXJ2ZXItdXNlcnNAbGlzdHMub3NnZW8ub3JnCmh0dHBz
Oi8vbGlzdHMub3NnZW8ub3JnL21haWxtYW4vbGlzdGluZm8vbWFwc2VydmVyLXVzZXJz

--===============1679766825788914317==--