0

I try to set up my first QGIS Server project on a remote host in an apache web server.

I managed to run samples data from the documentation.

Then I created locally a project with one layer in QGIS Desktop, saved as .qgs file, then uploaded this file and the layerwith the same relative path as on my computer on the host.

I get an internal server error, here is the apache log :

06:22:55 INFO Server[122451]: Request URL: http://xxx.xx.xxx.xxx/cgi-bin/qgis_mapserv.fcgi?MAP=/var/www/html/qgis/qgisfile.qgs&LAYERS=BATIMENT&SERVICE=WMS&REQUEST=GetMap&VERSION=1.3.0&WIDTH=1200&HEIGHT=800&CRS=EPSG:5490
06:22:55 INFO Server[122451]: Environment:
06:22:55 INFO Server[122451]: ------------------------------------------------
06:22:55 INFO Server[122451]: SERVER_NAME: xxx.xx.xxx.xx
06:22:55 INFO Server[122451]: REQUEST_URI: /cgi-bin/qgis_mapserv.fcgi?MAP=/var/www/html/qgis/qgisfile.qgs&LAYERS=BATIMENT&SERVICE=WMS&REQUEST=GetMap&VERSION=1.3.0&WIDTH=1200&HEIGHT=800&CRS=EPSG:5490
06:22:55 INFO Server[122451]: SCRIPT_NAME: /cgi-bin/qgis_mapserv.fcgi
06:22:55 INFO Server[122451]: REMOTE_ADDR: yyy.yy.yyy.yyy
06:22:55 INFO Server[122451]: SERVER_PORT: 80
06:22:55 INFO Server[122451]: QUERY_STRING: MAP=/var/www/html/qgis/qgisfile.qgs&LAYERS=BATIMENT&SERVICE=WMS&REQUEST=GetMap&VERSION=1.3.0&WIDTH=1200&HEIGHT=800&CRS=EPSG:5490
06:22:55 INFO Server[122451]: REQUEST_METHOD: GET
06:22:55 INFO Server[122451]: QGIS_PROJECT_FILE: /home/user/qgis/projects/world.qgs
06:22:55 INFO Server[122451]: SERVER_PROTOCOL: HTTP/1.1
Headers:
------------------------------------------------
"Accept" :  "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8"
"Host" :  "xxx.xx.xxx.xx"
"User-Agent" :  "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36"
06:22:55 INFO Server[122451]: CRS:EPSG:5490
06:22:55 INFO Server[122451]: HEIGHT:800
06:22:55 INFO Server[122451]: LAYERS:BATIMENT
06:22:55 INFO Server[122451]: MAP:/var/www/html/qgis/qgisfile.qgs
06:22:55 INFO Server[122451]: REQUEST:GetMap
06:22:55 INFO Server[122451]: SERVICE:WMS
06:22:55 INFO Server[122451]: VERSION:1.3.0
06:22:55 INFO Server[122451]: WIDTH:1200
06:22:55 INFO Server[122451]: WMS Request parameters:
06:22:55 INFO Server[122451]:  - CRS : EPSG:5490
06:22:55 INFO Server[122451]:  - WIDTH : 1200
06:22:55 INFO Server[122451]:  - HEIGHT : 800
06:22:55 INFO Server[122451]:  - LAYERS : BATIMENT
06:22:55 INFO Server[122451]:  - VERSION : 1.3.0
06:22:55 INFO server[122451]: Parallel rendering deactivated
QPaintDevice: Cannot destroy paint device that is being painted
06:22:55 CRITICAL Server[122451]: Rendering error : 'Invalid map settings'
06:22:55 WARNING [122451]: finish() called twice
06:22:55 INFO Server[122451]: Request finished in 11 ms

1 - Can I get a more precise info on which settings is invalid ?

2 - The param "QGIS_PROJECT_FILE" is not ok, and I can't find where to set or unset it. I checked the environment variables and the QGIS Desktop settings for my projetc, but didn't find anything. Can't find mention of it in the QGS either Edit : This param was set in the apache conf file

1 Answer 1

0

So after countless hours of fiddling, I found that adding &BBOX=-90,-180,90,180 in the param's url seems to do the trick

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.