<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <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="moz-cite-prefix">Am 24.10.22 um 11:12 schrieb Marcin
      Niemyjski via MapServer-users:<br>
    </div>
    <blockquote type="cite"
cite="mid:AS1PR03MB814973C8BB34275B522FE279A82E9@AS1PR03MB8149.eurprd03.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
      <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">
        Hello,</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">
        coming back to you with one more question about s3, namely:</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">
        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 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 ContentPasted0">
        <a
          href="https://httpd.apache.org/docs/2.4/rewrite/flags.html#flag_p"
          id="LPlnk949755" moz-do-not-send="true"
          class="moz-txt-link-freetext">https://httpd.apache.org/docs/2.4/rewrite/flags.html#flag_p</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 ContentPasted0 ContentPasted7">
        <a
href="https://mapserver.org/ogc/wms_server.html#changing-the-online-resource-url"
          id="LPlnk317784" moz-do-not-send="true"
          class="moz-txt-link-freetext">https://mapserver.org/ogc/wms_server.html#changing-the-online-resource-url</a><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 ContentPasted0">
        <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 ContentPasted0">
        generaly I want to do this:</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 ContentPasted0">
        <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 ContentPasted0 ContentPasted1">
        ProxyPass        /martest/ <a class="moz-txt-link-freetext" href="https://s3.amazon.com/Bucket/Key">https://s3.amazon.com/Bucket/Key</a><br
          class="ContentPasted1">
      </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 ContentPasted0 ContentPasted1
        ContentPasted8">
        ProxyPassReverse /martest/ <a
          href="https://s3.amazon.com/Bucket/Key" id="LPlnk802299"
          moz-do-not-send="true" class="moz-txt-link-freetext">
          https://s3.amazon.com/Bucket/Key</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 ContentPasted0 ContentPasted1">
        <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 ContentPasted0 ContentPasted1">
        or</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 ContentPasted0 ContentPasted1">
        <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 ContentPasted0 ContentPasted1
        ContentPasted3">
        <span style="font-family: Arial, Helvetica, sans-serif;">RewriteEngine
          on</span><span style="font-family: Arial, Helvetica,
          sans-serif;"><br>
        </span></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 ContentPasted0 ContentPasted1
        ContentPasted3">
        <span style="font-family: Arial, Helvetica, sans-serif;">RewriteRule
          /martest/ </span>
        <a href="https://s3.amazon.com/Bucket/" id="LPlnk154435"
          moz-do-not-send="true"><span style="font-family: Arial,
            Helvetica, sans-serif;">https://s3.amazon.com/Bucket/</span></a><br>
      </div>
      <pre class="ContentPasted4 elementToProof ContentPasted5 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" moz-do-not-send="true" class="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="ContentPasted4 elementToProof 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 style="font-family: Calibri, Arial, Helvetica, sans-serif;
        font-size: 12pt; color: rgb(0, 0, 0); background-color: rgb(255,
        255, 255);" class="elementToProof ContentPasted0 ContentPasted1
        ContentPasted2">
        <br>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
MapServer-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:MapServer-users@lists.osgeo.org">MapServer-users@lists.osgeo.org</a>
<a class="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>
  </body>
</html>