[Qgis-user] Hind the QGS path in the MAP Variable

1520 gis juliermeopensourcedeveloper at gmail.com
Thu Apr 8 09:03:45 PDT 2021


Thank you very much Mr. Pasotti and Mr. Boisteault for the reply.

Following Mr. Boisteault recommendation, I am already setting
QGIS_PROJECT_FILE, but this variable points only to .qgs file (default).
Instead of pointing to a file, I tried setting a directory to
QGIS_PROJECT_FILE, as: /home/qgis/projects/ or /home/qgis/projects/* or
/home/qgis/projects/*.*, but no success. In this case, I think we will need
to set QGIS_PROJECT_DIRECTORY instead of a file.

Now, according to MR Pasotti, I am already struggling while working on
mod_rewrite. Find below my attempt without success:

RewriteEngine on
RewriteCond %{REQUEST_URI}  ^cgi-bin/qgis_mapserv.fcgi$
RewriteCond %{QUERY_STRING} ^map=map.qgs$
RewriteRule ^cgi-bin/qgis_mapserv.fcgi\?$
/cgi-bin/qgis_mapserv.fcgi?map=/home/qgis/project/%1 [NC,QSA,R,L]

I appreciated your time

Kind regards

Julierme

On Thu, Apr 8, 2021 at 4:14 AM Alessandro Pasotti <apasotti at gmail.com>
wrote:

> On Thu, Apr 8, 2021 at 9:10 AM Nicolas Boisteault <nboisteault at 3liz.com>
> wrote:
> >
> > Hi,
> >
> > I think you should use QGIS_PROJECT_FILE environment variable for this
> purpose.
> >
>
>
> ... or mod_rewrite as an alternative for Apache.
>
> Nginx has a similar functionality.
>
> --
> Alessandro Pasotti
> QCooperative:  www.qcooperative.net
> ItOpen:   www.itopen.it
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20210408/c2f9999c/attachment.html>


More information about the Qgis-user mailing list