<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Eric,</p>
<p>thank oyu very much for this reply, I found your post clear and
usefull.</p>
<p>All the best.</p>
<p>W<br>
</p>
<div class="moz-cite-prefix">Il 26/02/19 16:33, Eric Lemoine ha
scritto:<br>
</div>
<blockquote type="cite"
cite="mid:20190226163318.33fd34d3@hookipa.localdomain">
<pre class="moz-quote-pre" wrap="">
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">Hi all,
I'm not a sysadmin but for our customers I'd like find the better way
for deploy QGIS-server 3.
I try at least 3 ways:
1) Apache2 + libapache2-mod-fcgid
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
There is Apache2 + mod_proxy_fcgi that you could use as well. As
opposed to mod_fcgid, mod_proxy_fcgi requires that you use your own
method for starting the FastCGI process(es) (QGIS Server here). In this
regard mod_proxy_fcgi is very similar to NGINX-based setups.
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">2) Nginx + fcgiwrap
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
I recently added a note to the QGIS Server docs [0] that recommends
against fcgiwrap. fcgiwrap is very slow, because it creates a new QGIS
Server process on each request!
[0]
<a class="moz-txt-link-rfc2396E" href="https://docs.qgis.org/testing/en/docs/user_manual/working_with_ogc/server/getting_started.html#nginx"><https://docs.qgis.org/testing/en/docs/user_manual/working_with_ogc/server/getting_started.html#nginx></a>
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
3) Nginx + QGIS-Server working by socket/service (systemd)
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
I like this one a lot, because it doesn't require anything else than
systemd, which has become very very common on Linux distros. I even
wrote a blog post about it :-) See [1].
[1]
<a class="moz-txt-link-rfc2396E" href="https://oslandia.com/en/2018/11/23/deploying-qgis-server-with-systemd/"><https://oslandia.com/en/2018/11/23/deploying-qgis-server-with-systemd/></a>
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
By delveloper side, what do you think is the best?
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
As already said I like the systemd-only method because it doesn't
require more than systemd, which you probably already have and use on
your Linux system.
spawn-fcgi works great as well, but you will need to use something like
supervisord, or write a systemd system unit for it.
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">
I'd like to much 3) solution, but I found some problems, in
particular, how many sockects I've to create watching at my server?
(Number of processors )
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
I'd recommend using one QGIS Server process per processor, or even a
few more for more parallelism during I/O operations. For example with 4
processors I think you can use 6-8 QGIS Server processes.
</pre>
<blockquote type="cite">
<pre class="moz-quote-pre" wrap="">For 1) and 2) have you experiences on performance and tuning?
</pre>
</blockquote>
<pre class="moz-quote-pre" wrap="">
Don't use 2 :-) I don't have much experience with 1 so I won't comment.
But Patrick's suggestions sound very good to me :)
One final note: at Oslandia we either use NGINX + systemd, or NGINX +
spawn-fcgi when running QGIS Server in Docker container. If you want
to use Docker I'd recommend taking a look at [2], which explains how we
build and run QGIS Server using Docker.
[2] <a class="moz-txt-link-rfc2396E" href="https://github.com/Oslandia/docker-qgis"><https://github.com/Oslandia/docker-qgis></a>
Good luck!
</pre>
</blockquote>
<div class="moz-signature">-- <br>
<p style="font-size:12px;">
Walter Lorenzetti phD<br>
email: <a class="moz-txt-link-abbreviated" href="mailto:lorenzetti@gis3w.it">lorenzetti@gis3w.it</a><br>
skype: aiki74<br>
twitter:<a href="https://twitter.com/w_lorenzetti">w_lorenzetti</a><br>
g+:<a href="https://plus.google.com/117055903318462447104/">aiki74</a><br>
Tel/Cell: (+39) 347-6597931<br>
Viale Verdi 24 - 51016 Montecatini Terme (PT)
<br>
<a
href="http://gis3w.it/it/calendario-corsi-software-geografici">Nuovi
corsi QGIS e GFOSS</a>
</p>
</div>
</body>
</html>