<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Thanks Abel!</p>
    <p>with the parameter the folders and files are now written to the
      specified directory.</p>
    <p>FcgidInitialEnv TEMP "X:\temp"</p>
    <p><br>
      The questions remain:<br>
      <br>
      Is it possible to disable the creation of temp folders and files?<br>
      <br>
      What use do they have?<br>
      <br>
      Is QGIS server responsible for this or the Apache http server?<br>
      <br>
    </p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">Am 30.06.2023 um 17:48 schrieb Abel
      Gonzalez:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAEnF797wLXsfTTQt9s2U5dozphjjrtFk+SyRg7Ocsd7d5zy2_w@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="auto">Hi! </div>
      <div dir="auto">You would have to add a variable where you define
        where QGIS server will save the temp files. Then you can create
        a script that erase these files from time to time😉</div>
      <div dir="auto">BR/Abel</div>
      <div><br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">fre 30 juni 2023 kl. 15:27
            skrev Jan Lippmann via QGIS-User <<a
              href="mailto:qgis-user@lists.osgeo.org"
              moz-do-not-send="true" class="moz-txt-link-freetext">qgis-user@lists.osgeo.org</a>>:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div>
              <div style="font-family:Verdana;font-size:12.0px">
                <div>
                  <div>Hello,</div>
                  <div>I have QGIS Server 3.28.7 and Apache 2.4.57
                    installed on a Windows server.</div>
                  <div> </div>
                  <div>The problem which exists:</div>
                  <div> </div>
                  <div>QGIS Server and or the Apache Server write
                    thousands of temp files and folders to the
                    C:\Windows folder on map requests.</div>
                  <div> </div>
                  <div>1. how to prevent these thousands of files and
                    folders from being created?<br>
                    2. how can I set a temp folder path that QGIS/Apache
                    use.</div>
                  <div> </div>
                  <div>The files and folders look like this:</div>
                  <div>"C:\Windows\qgis_mapserv-ZrKtPx"<br>
                    "C:\Windows\qgis_mapserv-ZWdliz"<br>
                    "C:\Windows\QGIS3-aFnerJ"<br>
                    "C:\Windows\QGIS3-anjafa"<br>
                    "C:\Windows\QGIS3-cUBeOv\ZjIOVf_styles.db"</div>
                  <div>Translated with <a
                      href="http://www.DeepL.com/Translator"
                      target="_blank" moz-do-not-send="true">www.DeepL.com/Translator</a>
                    (free version)</div>
                </div>
                <div> </div>
                <div> </div>
                <div>
                  <div>Would be great if someone could help me with
                    this.</div>
                  <div>Thanks a lot.</div>
                  <div>Greetings Jan</div>
                </div>
                <div> </div>
                <div> </div>
                <div>httpd-vhosts.conf:</div>
                <div>-----------------------</div>
                <div> </div>
                <div>
                  <div><br>
                    FcgidInitialEnv PATH
                    "C:\OSGeo4W\bin;C:\OSGeo4W\apps\qgis-ltr\bin;C:\OSGeo4W\apps\Qt5\bin"<br>
                    FcgidInitialEnv QT_PLUGIN_PATH
                    "C:\OSGeo4W\apps\qgis-ltr\qtplugins;C:\OSGeo4W\apps\Qt5\plugins"<br>
                    FcgidInitialEnv PYTHONHOME
                    "C:\OSGeo4W\apps\Python39"<br>
                    FcgidInitialEnv PYTHONPATH
"C:\OSGeo4W\apps\qgis-ltr\.\python;C:\OSGeo4W\apps\qgis-ltr\.\python\plugins;C:\OSGeo4W\apps\Python39\DLLs;C:\OSGeo4W\apps\Python39\lib;C:\OSGeo4W\bin;C:\OSGeo4W\apps\Python39;C:\OSGeo4W\apps\Python39\lib\site-packages"</div>
                  <div>FcgidInitialEnv QGIS_SERVER_LOG_LEVEL 0<br>
                    FcgidInitialEnv QGIS_SERVER_LOG_FILE
                    "C:\\webserver\\Apache24\\logs\\qgis_server.log"<br>
                    FcgidInitialEnv QGIS_SERVER_CACHE_SIZE 100</div>
                  <div>FcgidIOTimeout 120<br>
                    FcgidInitialEnv LC_ALL "en_US.UTF-8"<br>
                    FcgidInitialEnv PYTHONIOENCODING UTF-8<br>
                    FcgidInitialEnv LANG "en_US.UTF-8"<br>
                    FcgidInitialEnv QGIS_DEBUG 1<br>
                    FcgidInitialEnv QGIS_PLUGINPATH
                    "C:\OSGeo4W\apps\qgis-ltr\python\plugins"<br>
                    FcgidInitialEnv QGIS_SERVER_PARALLEL_RENDERING 1<br>
                    FcgidInitialEnv QGIS_SERVER_MAX_THREADS 3<br>
                    FcgidInitialEnv
                    QGIS_SERVER_LANDING_PAGE_PROJECTS_DIRECTORIES
                    "C:\webserver\qgis_ows\qgs"<br>
                    FcgidInitialEnv QGIS_SERVER_TRUST_LAYER_METADATA 1</div>
                  <div><br>
                     <br>
                    SetEnvIf Request_URI ^/qgis QGIS_PREFIX_PATH
                    "C:\OSGeo4W\apps\qgis-ltr"</div>
                  <div>SetEnvIf Request_URI ^/qgis GDAL_DATA
                    "C:\OSGeo4W\share\gdal"<br>
                    SetEnvIf Request_URI ^/qgis GDAL_DRIVER_PATH
                    "C:\OSGeo4W\bin"<br>
                    SetEnvIf Request_URI ^/qgis PDAL_DRIVER_PATH
                    "C:\OSGeo4W\bin"<br>
                    SetEnvIf Request_URI ^/qgis GDAL_SKIP "JP2ECW"<br>
                    SetEnvIf Request_URI ^/qgis PROJ_LIB
                    "C:\OSGeo4W\share\proj"</div>
                </div>
              </div>
            </div>
            _______________________________________________<br>
            QGIS-User mailing list<br>
            <a href="mailto:QGIS-User@lists.osgeo.org" target="_blank"
              moz-do-not-send="true" class="moz-txt-link-freetext">QGIS-User@lists.osgeo.org</a><br>
            List info: <a
              href="https://lists.osgeo.org/mailman/listinfo/qgis-user"
              rel="noreferrer" target="_blank" moz-do-not-send="true"
              class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
            Unsubscribe: <a
              href="https://lists.osgeo.org/mailman/listinfo/qgis-user"
              rel="noreferrer" target="_blank" moz-do-not-send="true"
              class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
          </blockquote>
        </div>
      </div>
    </blockquote>
  </body>
</html>