<div dir="ltr">Errata corrige, the demo project works, the sqlite file was with wrong permission.<br>Still doesn't load postgis layer<br><div><br></div><div>Amedeo</div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">Il giorno lun 7 lug 2025 alle ore 21:54 Amedeo Fadini <<a href="mailto:amefad@gmail.com">amefad@gmail.com</a>> ha scritto:<br></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">Hi everybody,<div><br></div><div>I'm upgrading a project based on QGIS server and moved all stuff to new server with Ubuntu 24, QGIS 3.40 LTR postgresql 16. </div><div>Webserver is nginx, QGIS server is configured on spawn-fcgi with single socket follwing the qgis manual <br><a href="https://docs.qgis.org/3.40/en/docs/server_manual/getting_started.html#spawn-fcgi" target="_blank">https://docs.qgis.org/3.40/en/docs/server_manual/getting_started.html#spawn-fcgi</a></div><div>The project use two layers from postgis, the connection is configured with pg service</div><div><br></div><div>Connecting on ssh with x.forwarding the project loads without any error and works fine</div><div><br></div><div>Calling the qgis server getcapabilities or get projectsettings it raise the error </div><div><span style="font-family:monospace;font-size:13px"><ServerException></span><span style="color:rgb(0,0,0);font-family:monospace;font-size:13px">Layer(s) not valid</span><span style="font-family:monospace;font-size:13px"></ServerException></span></div><div>Setting QGIS_SERVER_IGNORE_BAD_LAYERS=true getcapabilities works but postgis layer are not published or not showed in Getmap request.</div><div><br></div><div>Any clue? Where can I find more detailed erro log?</div><div><br></div><div>even the demo project world.qgs gives balnk image in getmap request. Am I misisng a local Xserver or gui configuration?</div><div><br></div><div>Below is my nginx conf and systemd/system/qgis-server.service</div><div><br></div><div>Thank you </div><div><br></div><div>Amedeo Fadini</div><div><br></div><div>---</div><div>server {<br> listen 80;<br> server_name <my server name>;<br><br> location /qgis/ {<br> include fastcgi_params;<br> fastcgi_param SCRIPT_FILENAME /usr/lib/cgi-bin/qgis_mapserv.fcgi;<br> #fastcgi_param QGIS_DEBUG 1;<br> fastcgi_param QGIS_SERVER_LOG_STDERR 1;<br> #fastcgi_param QGIS_SERVER_LOG_LEVEL 0;<br> fastcgi_param QGIS_SERVER_LOG_LEVEL 2;<br> #fastcgi_param PGSERVICEFILE /home/ubuntu/.pg_service.conf;<br> #fastcgi_param QGIS_PROJECT_FILE /home/ubuntu/fiduciali_qgis/fiduciali.qgs;<br> fastcgi_pass unix:/var/run/qgisserver.socket;<br> }<br>}<br></div><div><br></div><div><br></div><div>---</div><div><br></div><div>[Unit]<br>Description=QGIS server<br>After=network.target<br><br>[Service]<br>;; set env var as needed<br>;Environment="LANG=en_EN.UTF-8"<br>;Environment="QGIS_SERVER_PARALLEL_RENDERING=1"<br>;Environment="QGIS_SERVER_MAX_THREADS=12"<br>Environment="QGIS_SERVER_LOG_LEVEL=0"<br>Environment="QGIS_SERVER_LOG_STDERR=1"<br>Environment="PGSERVICEFILE=/home/ubuntu/.pg_service.conf"<br>;Environment="QGIS_PROJECT_FILE=/var/www/qgis_projects/world.qgs"<br>Environment="QGIS_PROJECT_FILE=/var/www/qgis_projects/fiduciali.qgs"<br>Environment="QGIS_SERVER_IGNORE_BAD_LAYERS=true"<br>;; or use a file:<br>;EnvironmentFile=/etc/qgis-server-env<br><br>ExecStart=spawn-fcgi -s /var/run/qgisserver.socket -U www-data -G www-data -n /usr/lib/cgi-bin><br><br>[Install]<br>WantedBy=multi-user.target<br></div></div>
</blockquote></div>