<div dir="ltr">Hi Michael,<br><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_quote">On Wed, Nov 26, 2014 at 8:30 AM, kimaidou <span dir="ltr"><<a href="mailto:kimaidou@gmail.com" target="_blank">kimaidou@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div>Hi list,<br><br></div>I would like to try Nginx / php-fpm as a replacement of Apache / mod_fcgid for Lizmap Web Client. I have googled a bit and found that it shall be possible to do so. Cf links [1] and [2] below<br><br></div>In [2], it seems that Larry would like to publish a recipe to achieve this. <br><br></div>Larry, or anyone else, could point me toward the right direction ?<br></div></blockquote><div><br><div class="gmail_extra">Yes, I can help with generating some recipes for serving QGIS Server, beyond Apache. I
 would like to see recipes for nginx and lighttpd included. Both require
 independent spawning of the FCGI binary as a separate process, and lighttpd has good FastCGI support via its internal (or exernal) 
spawn-fcgi utility. See links [0, 1, 2].<br><br>It is important to offer a solid, thoroughly tested nginx recipe as it 
is a commonly available Web server nowadays, and it uses very little in 
the way of resources (so good for low-RAM VPS setups). I personally don't serve 
any maps to enough users to properly test heavy loads. Will need help 
from other devs with load testing the recipes.<br><br></div><div class="gmail_extra">For nginx, you
 can also use spawn-fcgi (or fcgiwrap, etc.) but I have found the uWSGI 
[3] process manager to work very well with nginx. uWSGI also is beneficial 
for deploying the Python-based search functionality offered in the QGIS Web Client. While there are only a few examples of serving/spawning FastCGI under uWSGI (here's a simple one [4]), it is fully supported like many of the other protocols in uWSGI.<br><br></div><div class="gmail_extra">IMO, uWSGI offers the most configurable and flexible process manager, and can work well as a QGIS Server backend manager to almost any Web server frontend, e.g. nginx, lighttpd, Cherokee, Apache, etc, and on all platforms.<br><br></div><div class="gmail_extra">Of note: I used a lighttpd/spawn-fcgi setup for doing the labeling tests for Server. See [5, 6] (has some lightweight, non-production spawning script samples for Debian and Mac). One reason for this setup choice is that both tools now have a CMake build and could conceivably be a dependency for embedding a Server instance *inside* of the QGIS desktop application (for previewing Server output, without the need for any server setup on the part of the user).<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Concerning php-fpm, I believe that is only for managing a PHP FastCGI implementation and is now part of PHP source. I don't think it can be used to manage a QGIS Server process. It seems like a good fit for LizMap server-side PHP scripting, though.<br></div><div class="gmail_extra"><br></div><div class="gmail_extra">I
 also think it would be good to offer a tutorial on combining QGIS 
Server with other tools, like MapProxy [7], which is readily installable 
alongside OSGeo4W [8].<br></div><div class="gmail_extra"><br>[0] <a href="http://wiki.nginx.org/FcgiExample">http://wiki.nginx.org/FcgiExample</a><br>[1] <a href="http://chriswu.me/blog/writing-hello-world-in-fcgi-with-c-plus-plus/">http://chriswu.me/blog/writing-hello-world-in-fcgi-with-c-plus-plus/</a><br>[2] <a href="http://redmine.lighttpd.net/projects/spawn-fcgi/wiki">http://redmine.lighttpd.net/projects/spawn-fcgi/wiki</a><br>[3] <a href="https://uwsgi-docs.readthedocs.org/en/latest/">https://uwsgi-docs.readthedocs.org/en/latest/</a><br>[4] <a href="http://stackoverflow.com/a/24380105/2865523">http://stackoverflow.com/a/24380105/2865523</a><br><br>[5] <a href="https://github.com/qgis/QGIS/tree/master/tests/testdata/qgis_local_server">https://github.com/qgis/QGIS/tree/master/tests/testdata/qgis_local_server</a><br>[6] <a href="https://github.com/qgis/QGIS/blob/master/tests/src/python/qgis_local_server.py">https://github.com/qgis/QGIS/blob/master/tests/src/python/qgis_local_server.py</a><br><br>[7] <a href="http://mapproxy.org/">http://mapproxy.org/</a><br>[8] <a href="http://mapproxy.org/docs/1.6.0/install_osgeo4w.html">http://mapproxy.org/docs/1.6.0/install_osgeo4w.html</a><br><br></div><div class="gmail_extra">Regards,<br clear="all"></div><div><div class="gmail_signature"><br>Larry Shaffer<br>Dakota Cartography<br>Black Hills, South Dakota</div></div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><br>[1] <a href="https://github.com/cccs-web/core/wiki/Install-QGIS-Server-under-Nginx" target="_blank">https://github.com/cccs-web/core/wiki/Install-QGIS-Server-under-Nginx</a> <br>[2] <a href="http://lists.osgeo.org/pipermail/qgis-user/2014-July/028267.html" target="_blank">http://lists.osgeo.org/pipermail/qgis-user/2014-July/028267.html</a><br><br></div><div>Thanks in advance,<br><br></div><div>Michael<br></div></div></div>
<br>_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br></blockquote></div><br></div></div>