<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<span style="color:black;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;background-color:white">Jukka, Lars</span>
<div style="color:black;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;background-color:white">
<br>
</div>
<div style="color:black;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;background-color:white" class="elementToProof">
thanks for quick response.</div>
<div style="color:black;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;background-color:white" class="elementToProof">
<br>
</div>
<div style="color:black;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;background-color:white" class="elementToProof ContentPasted0 ContentPasted1">
Sorry for making a mistake and replying to you directly.<br>
</div>
<div style="color:black;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;background-color:white">
<br>
</div>
<div style="color:black;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;background-color:white">
Lars</div>
<div style="color:black;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;background-color:white">
Yes, my apache has all required modules active and the bucket I'm using is a public bucket. To be honest I'm not fully understand the mechanism of Apache, I'll go back and try using structure from docs. I do not understand the reasoning behind using Environment
 variable in this case. From my experience environmental variable for example, can be used to point file in which erros would be written. Could you please tell me more precisely how to use it in my case?</div>
<div style="color:black;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;background-color:white" class="elementToProof">
<br>
</div>
<div style="color:black;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;background-color:white" class="elementToProof">
Using env. variable for me wouldn't work because I'm using more than one mapfile (I'm displaying everyday S-2 scenes for Poland and Ukraine). The goal is to use mapserver hosted from docker, to which would be connected (apache redirect?) s3 bucket with mapfiles,
 so serving wms would be fully independent process without need to mount bucket.</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted2">
I think I'll try this way:<br>
<a href="https://stackoverflow.com/questions/9929487/using-apache-mod-alias-in-vhost-to-link-assets-from-external-server" id="LPlnk561286">https://stackoverflow.com/questions/9929487/using-apache-mod-alias-in-vhost-to-link-assets-from-external-server</a></div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="elementToProof ContentPasted2">
<br>
</div>
<div style="color:black;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;background-color:white">
Thank you both,</div>
<span style="color:black;font-size:12pt;font-family:Calibri,Arial,Helvetica,sans-serif;background-color:white">Marcin</span><br>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> MapServer-users <mapserver-users-bounces@lists.osgeo.org> on behalf of Lars Fricke <lars.fricke@skendata.de><br>
<b>Sent:</b> Monday, October 24, 2022 11:37 AM<br>
<b>To:</b> mapserver-users@lists.osgeo.org <mapserver-users@lists.osgeo.org><br>
<b>Subject:</b> Re: [MapServer-users] Redirecting to s3 via apache2 redirect/alias/proxy</font>
<div> </div>
</div>
<div>
<div style="color:#000000; font-weight:200; font-size:15px; font-style:normal; font-family:'source-sans-pro',Arial,Freesans; line-height:140%">
Three things come to my mind:<br>
1) Did you check if your Apache or NGINX respectively has the module installed and active?<br>
2) You do not have credentials in your second S3 URL example. This may be an issue.<br>
3) The structure in the doc's is different: <br>
```<br>
RewriteEngine on<br>
RewriteRule wmsmap?(.*) /cgi-bin/mapserv?map=/home/www/mapserverstuff/mymapfile.map&$1<br>
```<br>
I don't use this method myself but you may want to try using exactly the same replacement structure?<br>
<div>As said before, you could als use an Environment variable.<br>
Cheers Lars<br>
</div>
<div><br>
</div>
</div>
<div class="x_moz-cite-prefix">Am 24.10.22 um 11:12 schrieb Marcin Niemyjski via MapServer-users:<br>
</div>
<blockquote type="cite"><style type="text/css" style="display:none">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
Hello,</div>
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<br>
</div>
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
coming back to you with one more question about s3, namely:</div>
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<br>
</div>
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
As I wrote before - I want to keep my mapfiles on buckets but I also want to access them without need to mount buckets to VMs, so I've came up with this:</div>
<div class="x_elementToProof" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<br>
</div>
<div class="x_elementToProof x_ContentPasted0" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<a href="https://httpd.apache.org/docs/2.4/rewrite/flags.html#flag_p" id="LPlnk949755" class="x_moz-txt-link-freetext">https://httpd.apache.org/docs/2.4/rewrite/flags.html#flag_p</a></div>
<div class="x_elementToProof x_ContentPasted0 x_ContentPasted7" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<a href="https://mapserver.org/ogc/wms_server.html#changing-the-online-resource-url" id="LPlnk317784" class="x_moz-txt-link-freetext">https://mapserver.org/ogc/wms_server.html#changing-the-online-resource-url</a><br>
</div>
<div class="x_elementToProof x_ContentPasted0" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<br>
</div>
<div class="x_elementToProof x_ContentPasted0" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
generaly I want to do this:</div>
<div class="x_elementToProof x_ContentPasted0" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<br>
</div>
<div class="x_elementToProof x_ContentPasted0 x_ContentPasted1" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
ProxyPass        /martest/ <a class="x_moz-txt-link-freetext" href="https://s3.amazon.com/Bucket/Key">
https://s3.amazon.com/Bucket/Key</a><br class="x_ContentPasted1">
</div>
<div class="x_elementToProof x_ContentPasted0 x_ContentPasted1 x_ContentPasted8" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
ProxyPassReverse /martest/ <a href="https://s3.amazon.com/Bucket/Key" id="LPlnk802299" class="x_moz-txt-link-freetext">
https://s3.amazon.com/Bucket/Key</a></div>
<div class="x_elementToProof x_ContentPasted0 x_ContentPasted1" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<br>
</div>
<div class="x_elementToProof x_ContentPasted0 x_ContentPasted1" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
or</div>
<div class="x_elementToProof x_ContentPasted0 x_ContentPasted1" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<br>
</div>
<div class="x_elementToProof x_ContentPasted0 x_ContentPasted1 x_ContentPasted3" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<span style="font-family:Arial,Helvetica,sans-serif">RewriteEngine on</span><span style="font-family:Arial,Helvetica,sans-serif"><br>
</span></div>
<div class="x_elementToProof x_ContentPasted0 x_ContentPasted1 x_ContentPasted3" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<span style="font-family:Arial,Helvetica,sans-serif">RewriteRule /martest/ </span>
<a href="https://s3.amazon.com/Bucket/" id="LPlnk154435"><span style="font-family:Arial,Helvetica,sans-serif">https://s3.amazon.com/Bucket/</span></a><br>
</div>
<pre class="x_ContentPasted4 x_elementToProof x_ContentPasted5 x_ContentPasted6" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">so, while using WMS online resource url <a href="https://www.lpis.pl/cgi-bin/mapserv?map=/martest/jrc.map" id="LPlnk633910" class="x_moz-txt-link-freetext">https://www.lpis.pl/cgi-bin/mapserv?map=/martest/jrc.map</a> i would connect to mapfile on s3.
</pre>
<pre class="x_ContentPasted4 x_elementToProof x_ContentPasted5" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
But it doesn't seem to be working. Is this even possible to connect mapserver and s3 this way?

As always thank you for your help and time,
Marcin
</pre>
<div class="x_elementToProof x_ContentPasted0 x_ContentPasted1 x_ContentPasted2" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0); background-color:rgb(255,255,255)">
<br>
</div>
<br>
<fieldset class="x_moz-mime-attachment-header"></fieldset>
<pre class="x_moz-quote-pre">_______________________________________________
MapServer-users mailing list
<a class="x_moz-txt-link-abbreviated" href="mailto:MapServer-users@lists.osgeo.org">MapServer-users@lists.osgeo.org</a>
<a class="x_moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</pre>
</blockquote>
<br>
</div>
</body>
</html>