[Qgis-user] Qgis Server working but not logging

SkynetSau simone.didomenico at sautechgroup.com
Thu Aug 27 04:20:18 PDT 2020


Hi,
I've an issue with Qgis Server.
above service is not writing any log

My Configuration ==========================

O.S.:			Ubuntu 18.04.4 LTS
Qgis Server:	3.10.8+28bionic
web server:	nginix 1.14.0-0ubuntu1.7
modalità fcgi:	spawn-fcgi
Web Client: 	Lizmap ver. 3.3.9



Nginix Configuration ============================== [...]

location /qgisserver {
    gzip           off;    

    include fastcgi_params;

    fastcgi_param  QGIS_SERVER_LOG_FILE /var/log/qgis/qgis-server.log;
    fastcgi_param  QGIS_SERVER_LOG_LEVEL 0;
    fastcgi_param  QGIS_DEBUG 1;

    fastcgi_pass   unix:/tmp/qgisserver.socket;
	
    }

[...]
=====================================================

added init script with systemd for fastcgi service on O.S. startup

(/lib/systemd/system/aqp-spawn-fcgi.service)

Service configuration ===============================

[Unit]
Description=FastCGI spawner for Qgis Server After=syslog.target

[Service]
Type=forking
PIDFile=/var/run/%p.pid
SyslogIdentifier=%p
Environment=WORKERS=1
EnvironmentFile=-/etc/default/%p
ExecStart=/usr/bin/spawn-fcgi \
    -F ${WORKERS} \
    -d / \
    -u www-data \
    -g www-data \
    -s /tmp/qgisserver.socket \
    -P /var/run/%p.pid \
    -- /usr/lib/cgi-bin/qgis_mapserv.fcgi
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target

======================================================


added script for enviroenment variables in /etc/profile.d/qgis-server.sh
===========

export QGIS_DEBUG=1
export QGIS_SERVER_LOG_FILE="/var/log/qgis/qgis-server.log"
export QGIS_SERVER_LOG_LEVEL=0

=================================================================================================

typing "printenv" variables are correctly setted and server works (tested
with Lizmap and directly by typing urls of WMS external services)

Problem is only Qgis-Server log writing. I tryed also to create log file
manually and giving it 777 chmod attribute, but is always empty.

Can you help me?

Thank You.



--
Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html


More information about the Qgis-user mailing list