<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><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;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
span.contentpasted0
        {mso-style-name:contentpasted0;}
span.EmailStyle21
        {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:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">What isn’t working with the configuration you have in place on docker? The locations aren’t virtual hosts so they’d be sharing a mapserver config file. The config file support will fall back to an environment variable if the value isn’t
 set explicitly in the config file – we get that for free with the CPL functions being used. So, at first glance it seems like having a custom value for MS_MAPFILE based on location should work assuming you don’t have that value set in the mapserver config
 file.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> MapServer-users <mapserver-users-bounces@lists.osgeo.org>
<b>On Behalf Of </b>Marcin Niemyjski via MapServer-users<br>
<b>Sent:</b> Thursday, January 5, 2023 5:46 AM<br>
<b>To:</b> Marcin Niemyjski via MapServer-users <mapserver-users@lists.osgeo.org><br>
<b>Subject:</b> [MapServer-users] How to create aliases on mapserver docker image camptocamp/mapserver?<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div class="MsoNormal" align="center" style="text-align:center">
<hr size="2" width="100%" align="center">
</div>
<div>
<div>
<p class="MsoNormal"><span class="contentpasted0"><span style="font-size:12.0pt;color:black;background:white">Hello,</span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span class="contentpasted0"><span style="font-size:12.0pt;color:black;background:white">I'm using camptocamp mapserver docker image. I want to create Aliases so I can access several mapfiles using their file names,
</span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span class="contentpasted0"><span style="font-size:12.0pt;color:black;background:white">example:
<a href="http://www.service.pl/WMSNo1">www.service.pl/WMSNo1</a> instead of <a href="https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.service.pl%2F&data=05%7C01%7Csteve.lime%40state.mn.us%7C2d095d4e751240e1742808daef12621c%7Ceb14b04624c445198f26b89c2159828c%7C0%7C0%7C638085159479253733%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=6htBeD8jSSlM6UEANoVIQFUSFR3oQHYl%2F%2FQL3JCh97c%3D&reserved=0">
www.service.pl</a>?map=/etc/mapserver/WMSNo1.map. </span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span class="contentpasted0"><span style="font-size:12.0pt;color:black;background:white">Could you please provide me an example of how to edit /etc/apache2/apache2.conf to make it work?
</span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span class="contentpasted0"><span style="font-size:12.0pt;color:black;background:white">On regular Mapserver I'm using this as alias and it works just fine:</span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span class="contentpasted0"><span style="font-size:12.0pt;color:black;background:white">Alias /Sentinel2Ukraine "/usr/lib/cgi-bin/mapserv"
</span></span><span class="contentpasted0"><span style="font-size:12.0pt;color:black;background:white"><o:p></o:p></span></span></p>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black;background:white"><Location /Sentinel2Ukraine ></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black;background:white">   SetHandler cgi-script<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black;background:white">   Options ExecCGI<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black;background:white">   SetEnv MS_MAPFILE "/DyskPlanetiler/MAPFILEs/automatyzacja/Sentinel2Ukraine.map"<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span class="contentpasted0"><span style="font-size:12.0pt;color:black;background:white"></Location></span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span class="contentpasted0"><span style="font-size:12.0pt;color:black;background:white">On camptocamp I created somthing similiar to code above:</span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span class="contentpasted0"><span style="font-size:12.0pt;color:black;background:white">Alias /Sentinel2Ukraine "/usr/local/bin/mapserv"
</span></span><span class="contentpasted0"><span style="font-size:12.0pt;color:black;background:white"><o:p></o:p></span></span></p>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black;background:white"><Location /Sentinel2Ukraine ></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black;background:white">        SetHandler cgi-script<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black;background:white">        Options ExecCGI<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black;background:white">        SetEnv MS_MAPFILE "/etc/mapserver/Sentinel2Ukraine.map"<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black;background:white"></Location><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black;background:white"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black;background:white">Alias /Sentinel2Poland "/usr/local/bin/mapserv"<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black;background:white"><Location /Sentinel2Poland ><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black;background:white">        SetHandler cgi-script<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black;background:white">        Options ExecCGI<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span style="font-size:12.0pt;color:black;background:white">        SetEnv MS_MAPFILE "/etc/mapserver/Sentinel-2-PL.map"<o:p></o:p></span></p>
</div>
<p class="MsoNormal"><span class="contentpasted0"><span style="font-size:12.0pt;color:black;background:white"></Location></span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span class="contentpasted0"><span style="font-size:12.0pt;color:black;background:white">Best,</span></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span class="contentpasted0"><span style="font-size:12.0pt;color:black;background:white">Marcin</span></span><o:p></o:p></p>
</div>
<div>
<div id="Signature">
<div>
<table class="MsoNormalTable" border="0" cellpadding="0" width="95%" style="width:95.0%">
<tbody>
<tr style="height:33.75pt">
<td style="padding:.75pt .75pt .75pt .75pt;height:33.75pt"></td>
</tr>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt"></td>
</tr>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt"></td>
</tr>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt"></td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><span style="display:none"><o:p> </o:p></span></p>
<table class="MsoNormalTable" border="0" cellpadding="0" id="pbpsiglinktable">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><a href="https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Foutlook.office.com%2Fbookwithme%2Fuser%2F6347c7def05a478ba013ae948648789d%40cloudferro.com%3Fanonymous%26ep%3Dsignature&data=05%7C01%7Csteve.lime%40state.mn.us%7C2d095d4e751240e1742808daef12621c%7Ceb14b04624c445198f26b89c2159828c%7C0%7C0%7C638085159479253733%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=pm6EgkSTxCH%2Fe9Ht44OvJShOVjNR2JbBMGwSvF3f3Tk%3D&reserved=0"><span style="text-decoration:none"><img border="0" width="20" height="20" style="width:.2083in;height:.2083in" id="Picture_x0020_2" src="cid:image001.png@01D921B4.154084C0"></span></a><o:p></o:p></p>
</td>
<td style="padding:.75pt .75pt .75pt .75pt"></td>
<td style="padding:.75pt .75pt .75pt .75pt">
<p class="MsoNormal"><a href="https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Foutlook.office.com%2Fbookwithme%2Fuser%2F6347c7def05a478ba013ae948648789d%40cloudferro.com%3Fanonymous%26ep%3Dsignature&data=05%7C01%7Csteve.lime%40state.mn.us%7C2d095d4e751240e1742808daef12621c%7Ceb14b04624c445198f26b89c2159828c%7C0%7C0%7C638085159479409085%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=X8XCOdQDaHr%2BwCXgeoyshmg5ErqGIMIda6dy7uthFfo%3D&reserved=0"><span style="color:#0078D4;text-decoration:none">Book
 time to meet with me</span></a><o:p></o:p></p>
</td>
<td style="padding:.75pt .75pt .75pt .75pt">
<table class="MsoNormalTable" border="0" cellpadding="0">
<tbody>
<tr>
<td style="padding:.75pt .75pt .75pt .75pt"></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>