<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>Hello everyone,</p>
<p>I want to test if QGIS Server is working. To do this, I'm running
<code>/usr/lib/cgi-bin/qgis_mapserv.fcgi</code>, and I'm getting
the following response: <br>
</p>
<p><i><font size="1">"Application path not initialized<br>
Application path not initialized<br>
Application path not initialized<br>
Application path not initialized<br>
Warning 1: Unable to find driver ECW to unload from GDAL_SKIP
environment variable.<br>
Warning 1: Unable to find driver ECW to unload from GDAL_SKIP
environment variable.<br>
Warning 1: Unable to find driver JP2ECW to unload from
GDAL_SKIP environment variable.<br>
"Loading native module /usr/lib/qgis/server/libdummy.so"<br>
"Loading native module /usr/lib/qgis/server/liblandingpage.so"<br>
"Loading native module /usr/lib/qgis/server/libwcs.so"<br>
"Loading native module /usr/lib/qgis/server/libwfs.so"<br>
"Loading native module /usr/lib/qgis/server/libwfs3.so"<br>
"Loading native module /usr/lib/qgis/server/libwms.so"<br>
"Loading native module /usr/lib/qgis/server/libwmts.so"<br>
<string>:1: DeprecationWarning: setapi() is deprecated<br>
Content-Length: 0<br>
Location: <a class="moz-txt-link-freetext" href="http:/index.json">http:/index.json</a><br>
Server: QGIS FCGI server - QGIS version 3.22.4-Białowieża<br>
Status: 302"</font></i></p>
<p>Is-it normal?<br>
</p>
<p>My Apache configuration is as follows:</p>
<p><i><font size="1"><VirtualHost *:80><br>
ServerAdmin webmaster@localhost<br>
ServerName ...........................<br>
<br>
DocumentRoot /var/www/html<br>
<br>
# Apache logs (different than QGIS Server log)<br>
ErrorLog ${APACHE_LOG_DIR}/qgis.demo.error.log<br>
CustomLog ${APACHE_LOG_DIR}/qgis.demo.access.log combined<br>
<br>
# Longer timeout for WPS... default = 40<br>
FcgidIOTimeout 120<br>
<br>
FcgidInitialEnv LC_ALL "en_US.UTF-8"<br>
FcgidInitialEnv PYTHONIOENCODING UTF-8<br>
FcgidInitialEnv LANG "en_US.UTF-8"<br>
<br>
# QGIS log<br>
FcgidInitialEnv QGIS_SERVER_LOG_STDERR 1<br>
FcgidInitialEnv QGIS_SERVER_LOG_FILE
/var/log/apache2/qgisserver.log<br>
FcgidInitialEnv QGIS_SERVER_LOG_LEVEL 2<br>
<br>
FcgidInitialEnv HOME /home/qgis<br>
FcgidInitialEnv QGIS_DEBUG 0<br>
<br>
# default QGIS project<br>
SetEnv QGIS_PROJECT_FILE /srv/data/<br>
<br>
# Lizmap for QGIS-Server<br>
FcgidInitialEnv QGIS_SERVER_LIZMAP_REVEAL_SETTINGS True<br>
<br>
# QGIS Plugin Pfad<br>
FcgidInitialEnv QGIS_PLUGINPATH /var/www/qgis-server/plugins<br>
<br>
# QGIS_AUTH_DB_DIR_PATH must lead to a directory writeable
by the Server's FCGI process user<br>
FcgidInitialEnv QGIS_AUTH_DB_DIR_PATH
/home/qgis/qgisserverdb/<br>
FcgidInitialEnv QGIS_AUTH_PASSWORD_FILE
/home/qgis/qgisserverdb/qgis-auth.db<br>
<br>
<br>
# Set pg access via pg_service file<br>
SetEnv PGSERVICEFILE /home/qgis/.pg_service.conf<br>
FcgidInitialEnv PGPASSFILE /home/qgis/.pgpass<br>
<br>
# if qgis-server is installed from packages in debian based
distros this is usually /usr/lib/cgi-bin/<br>
# run "locate qgis_mapserv.fcgi" if you don't know where
qgis_mapserv.fcgi is<br>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/<br>
<Directory "/usr/lib/cgi-bin/"><br>
AllowOverride None<br>
Options +ExecCGI -MultiViews -SymLinksIfOwnerMatch<br>
Require all granted<br>
</Directory><br>
<br>
# Maximum request length and connect timeout for mod_fcgid<br>
<IfModule mod_fcgid.c><br>
FcgidMaxRequestLen 26214400<br>
FcgidConnectTimeout 60<br>
</IfModule><br>
<br>
</VirtualHost><br>
</font></i></p>
<p>With Lizmap QGIS Server is not installed properly, or the OGC
request URL provided in the Lizmap configuration is incorrect.<br>
</p>
<p>Thank you in advance for your responses! <br>
</p>
<pre class="moz-signature" cols="72">--
Philippe CIANFARANI
Chef de projet SIG
Syndicat Mixte du SCoT de la Haute Gironde Blaye - Estuaire
Maison des Services au Public
32 rue des Maçons - BP 134
33391 Blaye Cedex
05.57.94.11.87/06.51.10.97.86</pre>
</body>
</html>