[Qgis-user] qgis-web-client and updating existing project files

Niklaas Baudet von Gersdorff niklaas at kulturflatrate.net
Tue Jul 8 00:46:35 PDT 2014


Hi Larry,

thank you for your long reply.

On 2014-07-08 06:32, Larry Shaffer wrote:

> Hmm. It should be invalidating the related cache entries to the
> project, when the project file has changed:
> https://github.com/qgis/QGIS/blob/master/src/mapserver/qgsconfigcache.cpp#L36
> [4]

OK.

> Seems like just refreshing your browser after each project file save
> should do the trick. You may have to close the project file in QGIS
> Desktop, or your file editor, if editing it by hand. Some of this may
> not work on every platform.
> 
> If that fails, it should be reported as an issue. In the meantime...

So, I played around with different project settings and changing one of 
the layer's symbol to check whether the changes take effect. And 
surprisingly they do now. I think it had something to do with the fact 
that the CRS of the project file and the one configured in 
GlobalOptions.js (var authid = ...) were not set the same. (This also 
resulted in the initial view in the web client not being the same as the 
one in the desktop application.) I also opened the web client in a 
private window in Icedove which might have prevented loading cached 
files, too.

> Since you are running Nginx already, you can spawn the
> qgis_mapserv.fcgi process independently and use Nginx's fastcgi_module
> [0] to pass the request on to your spawned process. This allows you to
> specifically re-start the qgis_mapserv process without affecting any
> other web server process. Restarting the process should invalidate its
> cache and re-parse your project file. However, the project refresh
> noted above may just work anyway, when using spawn-fcgi (untested).

Thank you very much for pointing me to a direction on how to use NGINX 
with qgis_mapserv.fcgid . I have always tended to first get the software 
working in the way it is described in the documentary and after that 
playing around and optimising it. (By sending this link above and those 
at the bottom, you might have prevented other emails by me. ;-) )

> You can use various tools to spawn the qgis_mapserv process, but I
> prefer either spawn-fcgi [1] or uWSGI [2]. spawn-fcgi is the simplest
> to integrate; here is an example [3].

OK, thank you. I will have a look at those and will try to get a working 
solution. Since you wrote that spwan-fcgi is untested concerning 
refreshing the project file I will keep you updated about this.

> The user/group you run spawn-fcgi under will need access to the QGIS
> project file (and data directories, if any) that you specify with the
> MAP request parameter.

Of course, thank you.

> [0] http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html
> 
> [1] http://redmine.lighttpd.net/projects/spawn-fcgi/wiki/WikiStart
>  [2] http://projects.unbit.it/uwsgi/
> [3] http://wiki.habariproject.org/en/Installation_using_Nginx

I appreciate your help; all the best,

Niklaas

-- 
Niklaas Baudet von Gersdorff
niklaas at kulturflatrate.net



More information about the Qgis-user mailing list