[QGIS-Developer] QGIS server landing page when running as fastcgi?
Alessandro Pasotti
apasotti at gmail.com
Tue Feb 2 05:39:56 PST 2021
Unless you have custom resources (templates) this is definitely wrong:
export QGIS_SERVER_API_RESOURCES_DIRECTORY="/tmp/resources"
Have a look to
https://docs.qgis.org/3.16/en/docs/server_manual/config.html#environment-variables
You are also using the deprecated QGIS_SERVER_LOG_FILE, use
QGIS_SERVER_LOG_STDERR instead.
And: QGIS_SERVER_LOG_LEVEL=0 as explained in the a.m. documentation.
QGIS_DEBUG will do anything if you don't have a debug build.
On Tue, Feb 2, 2021 at 2:27 PM Richard Duivenvoorde <rdmailings at duif.net> wrote:
>
> On 2/2/21 1:58 PM, Alessandro Pasotti wrote:
> > This looks bad:
> >
> > ./src/core/qgsproviderregistry.cpp:179 : (init) [0ms] No dynamic QGIS
> > data provider plugins found in:
> > /usr/lib/qgis/plugins
> > and:
> > No authentication methods can be used. Check your QGIS installation
> > Fix your prefix path.
>
>
> No no, that is because I run the spawn-fcgi command from the docs, BUT without setting any environment variable..
>
> All is working: wms/wfs/api when I run as fastcgi, because then those are all defined in my apache conf, see below:
>
> >> Testing with all this magic:
> >>
> >> FcgidIOTimeout 120
> >> FcgidInitialEnv LC_ALL "en_US.UTF-8"
> >> FcgidInitialEnv PYTHONIOENCODING UTF-8
> >> FcgidInitialEnv LANG "en_US.UTF-8"
> >> FcgidInitialEnv QGIS_DEBUG 5
> >> FcgidInitialEnv QGIS_SERVER_LOG_FILE "/tmp"
> >> FcgidInitialEnv QGIS_SERVER_LOG_LEVEL 5
> >> #FcgidInitialEnv QGIS_PROJECT_FILE "/usr/lib/cgi-bin/cbsgemeenten2018.qgz" # with or without this one that project is loaded
> >> FcgidInitialEnv QGIS_SERVER_LANDING_PAGE_PROJECTS_DIRECTORIES "/tmp/qgisserver"
> >> FcgidInitialEnv QGIS_OPTIONS_PATH "/tmp"
> >> FcgidInitialEnv QGIS_SERVER_CACHE_DIRECTORY "."
> >> FcgidInitialEnv QGIS_SERVER_API_RESOURCES_DIRECTORY "/home/richard/git/qgis/build/output/data/"
> >> FcgidInitialEnv PYTHONPATH "/home/richard/bin/qgis_/master/debug/share/qgis/python"
> >> FcgidInitialEnv LD_LIBRARY_PATH "/home/richard/bin/qgis_/master/debug/lib/:/home/richard/bin/gdal/lib"
> >> FcgidInitialEnv QGIS_PREFIX_PATH "/home/richard/bin/qgis_/master/debug"
>
> So tried:
> export QGIS_DEBUG=5
> export QGIS_SERVER_LOG_FILE="/tmp"
> export QGIS_SERVER_LOG_LEVEL=5
> export QGIS_PROJECT_FILE="/usr/lib/cgi-bin/cbsgemeenten2018.qgz"
> export QGIS_SERVER_LANDING_PAGE_PROJECTS_DIRECTORIES="/tmp/qgisserver"
> #export QGIS_OPTIONS_PATH="/tmp"
> export QGIS_SERVER_CACHE_DIRECTORY="/tmp"
> export QGIS_SERVER_API_RESOURCES_DIRECTORY="/tmp/resources"
> export PYTHONPATH="/home/richard/bin/qgis_/master/debug/share/qgis/python"
> export LD_LIBRARY_PATH="/home/richard/bin/qgis_/master/debug/lib/:/home/richard/bin/gdal/lib"
> export QGIS_PREFIX_PATH="/home/richard/bin/qgis_/master/debug"
>
> and ran spawn-fcgi again
> I see:
> ../src/core/qgsmessagelog.cpp:29 : (logMessage) [0ms] 2021-02-02T14:13:25 Server[0] Adding service SampleService 1.0
> "Loading native module /home/richard/bin/qgis_/master/debug/lib/qgis/server/liblandingpage.so"
>
> And given the api's work I think my apache config is OK... but I cannot check logs
>
> My main issues:
> - the missing catalog landingpage
> - I never see any logfiles appear (so can not check the chatty logs :-))
>
> Regards,
>
> Richard
--
Alessandro Pasotti
QCooperative: www.qcooperative.net
ItOpen: www.itopen.it
More information about the QGIS-Developer
mailing list