[MapServer-users] How to create aliases on mapserver docker image camptocamp/mapserver?

Marcin Niemyjski mniemyjski at cloudferro.com
Thu Jan 5 03:45:38 PST 2023


Hello,

I'm using camptocamp mapserver docker image. I want to create Aliases so I can access several mapfiles using their file names,

example: www.service.pl/WMSNo1 instead of www.service.pl<http://www.service.pl/>?map=/etc/mapserver/WMSNo1.map.

Could you please provide me an example of how to edit /etc/apache2/apache2.conf to make it work?

On regular Mapserver I'm using this as alias and it works just fine:
Alias /Sentinel2Ukraine "/usr/lib/cgi-bin/mapserv"
<Location /Sentinel2Ukraine >
   SetHandler cgi-script
   Options ExecCGI
   SetEnv MS_MAPFILE "/DyskPlanetiler/MAPFILEs/automatyzacja/Sentinel2Ukraine.map"
</Location>

On camptocamp I created somthing similiar to code above:

Alias /Sentinel2Ukraine "/usr/local/bin/mapserv"
<Location /Sentinel2Ukraine >
        SetHandler cgi-script
        Options ExecCGI
        SetEnv MS_MAPFILE "/etc/mapserver/Sentinel2Ukraine.map"
</Location>

Alias /Sentinel2Poland "/usr/local/bin/mapserv"
<Location /Sentinel2Poland >
        SetHandler cgi-script
        Options ExecCGI
        SetEnv MS_MAPFILE "/etc/mapserver/Sentinel-2-PL.map"
</Location>

Best,
Marcin




[cid:82461a60-acc1-4e39-b8ee-5bb3f8c6119c]<https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae948648789d@cloudferro.com?anonymous&ep=signature>           Book time to meet with me<https://outlook.office.com/bookwithme/user/6347c7def05a478ba013ae948648789d@cloudferro.com?anonymous&ep=signature>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20230105/50f79a19/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Outlook-g2f5ffip.png
Type: image/png
Size: 528 bytes
Desc: Outlook-g2f5ffip.png
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20230105/50f79a19/attachment-0001.png>


More information about the MapServer-users mailing list