[Qgis-user] Qgis server : install on Linux Debian

Tomas Pospisek tpo2 at sourcepole.ch
Wed Mar 15 10:23:14 PDT 2023


On 15.03.23 16:23, celati Laurent via QGIS-User wrote:
> Good afternnon,
> 
> I want to install Qgis server on my Linux Debian server virtual .For 
> now, it's not working.
> FYI, I already have a working apache server and used for geoserver and 
> geonetwork.
> 
> I followed the Qgis server doc/tutorial:
> https://docs.qgis.org/3.22/en/docs/training_manual/qgis_server/install.html <https://docs.qgis.org/3.22/en/docs/training_manual/qgis_server/install.html>
> https://docs.qgis.org/3.22/en/docs/server_manual/getting_started.html#installation-on-debian-based-systems <https://docs.qgis.org/3.22/en/docs/server_manual/getting_started.html#installation-on-debian-based-systems>
> 
> FYI, when I test the executable, here is the message.The version seems 
> to be qgis 3.10 (and not 3.22). And the status message is 200 and not 400.
> /[code]root at XXXXXXXXXX:/usr/lib/cgi-bin# 
> /usr/lib/cgi-bin/qgis_mapserv.fcgi --version
> Application path not initialized
> Application path not initialized
> Application path not initialized
> QStandardPaths: runtime directory '/run/user/1001' is not owned by UID 
> 0, but a directory permissions 0700 owned by UID 1001 GID 1001
> Warning 1: Unable to find ECW driver to unload from GDAL_SKIP 
> environment variable.
> Warning 1: Unable to find ECW driver to unload from GDAL_SKIP 
> environment variable.
> Warning 1: Unable to find driver JP2ECW to unload from GDAL_SKIP 
> environment variable.
> Initializing server modules from "/usr/lib/qgis/server"
> "Checking /usr/lib/qgis/server for native services modules"
> "Loading native module /usr/lib/qgis/server/libdummy.so"
> "Loading native module /usr/lib/qgis/server/libwcs.so"
> "Loading native module /usr/lib/qgis/server/libwfs.so"
> "Loading native module /usr/lib/qgis/server/libwfs3.so"
> "Loading native module /usr/lib/qgis/server/libwms.so"
> "Loading native module /usr/lib/qgis/server/libwmts.so"
> <string>:1: DeprecationWarning: setapi() is deprecated
> Logged warning: Loading a file that was saved with an older version of 
> qgis (saved in 0.0.0, loaded in 3.10.14-A Coruña). Problems may occur.
> Content Length: 206
> Content-Type: text/xml; charset=utf-8
> [b]Server: Qgis FCGI server - QGis version 3.10.14-A Coruña
> Status: 200
> <ServiceExceptionReport xmlns="http://www.opengis.net/ogc 
> <http://www.opengis.net/ogc>" version="1.3.0">
> <ServiceException code="Service configuration error">Service unknown or 
> unsupported</ServiceException>
> </ServiceExceptionReport>/

I guess it's best to solve one problem after the other. So above we see 
that the qgis server is working.

We do not see how you installed the server. I am guessing you did a `apt 
install qgis-server`. If that's the case then you should be able to see 
the version of the installed qgis server like this: `dpkg -s qgis-server`.

> I installed mod_fcgid successfully.
> As I already Apache installed. What should I do ? I would like to be 
> able to coexist geoserver, geonetwork and qgis server. I would like to 
> be able to add for qgis server a https://SERVEUR_NAME/qgis_server 
> <https://SERVEUR_NAME/qgis_server> URL.
> 
> I created a qgis.demo.conf file under etc/apache2/sites-available. I 
> only replaced ServerName with my server's IP. I haven't changed anything 
> else. Given my needs and working environment, should I modify the first 
> line of the file? :
> <VirtualHost *:80>[
> 
> /I created the directories that will store the QGIS server logs and the 
> authentication database logs:
> [code]mkdir -p /var/log/qgis/
> chown www-data:www-data /var/log/qgis
> mkdir -p /home/qgis/qgisserverdb
> chown www-data:www-data /home/qgis/qgisserverdb/
> 
> I enabled fgcid mode and virtual host. But after restarting apache, I 
> got nothing.
> /
> root at XXXXXXXXXXXXXXXX:/etc# curl 
> http://XXXXXXX.fr/cgi-bin/qgis_mapserv.fcgi 
> <http://XXXXXXX.fr/cgi-bin/qgis_mapserv.fcgi>
> <!PUBLIC HTML DOCTYPE "-//IETF//HTML 2.0 DTD//EN">
> <html><head>
> <title>301 Moved Permanently</title>
> </head><body>
> <h1>Moved Permanently</h1>
> <p>The document has moved <a 
> href="https://XXXXXXXXXXXcgi-bin/qgis_mapserv.fcgi 
> <https://XXXXXXXXXXXcgi-bin/qgis_mapserv.fcgi>">here</a>.</p>
> <hr>
> <address>Apache/2.4.54 (Debian) Server at XXXXXXX.fr Port 80</address>
> </body></html>[/code]/

You need to configure apache so that when it gets the URL 
http://XXXXXXX.fr/cgi-bin/qgis_mapserv.fcgi that the request ends up at 
the qgis server.

> Via the browser, when I try 
> /XXXXX.fr/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities/
> It says Site Unreachable.
> 
> If someone could help me? THANKS.

*t



More information about the QGIS-User mailing list