1

I'm running QGIS server on Debian. It’s a virtual machine.

I already tried searching, but I found nothing, that helped me out. What I did:

I installed QGIS Server and all needed packages. I can talk to the server via http, when I call this link: http://IP/cgi-bin/qgis_mapserv.fcgi

Answer:

<ServiceExceptionReport version="1.3.0">
    <ServiceException code="Service configuration error">Service unknown or unsupported</ServiceException>
</ServiceExceptionReport>

So far, so nice.

When I call:

http://IP/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities&MAP=/var/www/html/S5/qgis/test/qgis-demo/world3.qgs

I get:

<ServiceExceptionReport version="1.3.0">
<ServiceException code="WMS configuration error">
There was an error reading the project file or the SLD configuration
</ServiceException>
</ServiceExceptionReport>

I set the rights to the Folder /var/www/html/S5/qgis and all Folders and files inside to 775 via chmod but I cant get it to work. I have no idea and I find no useful threads in the hole internet to help me out.

Problem 2 is, that qgis-server is not writing any logs. For logs, I set up a config in

/etc/apache2/mods-enabled/fcgid.conf

like this:

#Tell QGIS Server instances to use a specific display number for xvfb
# necessary for printing, see below
FcgidInitialEnv DISPLAY ":99"
# Activate QGIS log (different from apache logs)
FcgidInitialEnv QGIS_SERVER_LOG_FILE /var/log/qgis/qgisserver.log
FcgidInitialEnv QGIS_SERVER_LOG_LEVEL "0"
FcgidInitialEnv QGIS_DEBUG 1
# Add a default QGIS project
#SetEnv QGIS_PROJECT_FILE /var/www/html/S5/qgis/qgis-demo.qgz
# QGIS_AUTH_DB_DIR_PATH must lead to a directory writeable by www-data
FcgidInitialEnv QGIS_AUTH_DB_DIR_PATH "/var/www/qgis-server/qgisserverdb/"
FcgidInitialEnv QGIS_AUTH_PASSWORD_FILE "/var/www/qgis-server/qgisserverdb/qgis-auth.db"

<IfModule mod_fcgid.c>
# Longer timeout for WPS... default = 40
FcgidIOTimeout 120
FcgidMaxRequestLen 26214400
FcgidConnectTimeout 60
</IfModule

The owner of the logfile is www-data. I set a # to comment the standard project file out to serve the WMS via the attribute MAP.

I tried other project as well, but its not working. Can anybody help me out please?

1 Answer 1

0

The configuration below is working for me:

    <VirtualHost *:80>
    ...
    LogLevel alert
    ErrorLog ${APACHE_LOG_DIR}/error.log
    <IfModule mod_fcgid.c>
    ...
    FcgidInitialEnv QGIS_SERVER_LOG_LEVEL "0"
    FcgidInitialEnv QGIS_SERVER_LOG_FILE ${APACHE_LOG_DIR}/qgisserver.log
    FcgidInitialEnv QGIS_SERVER_LOG_STDERR "1"
    ... 
    </IfModule>
    ...
    </VirtualHost>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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