[Qgis-user] Issues with OSGeo4W Apache startup (for QGIS Server)

Peter Len peteralen at earthlink.net
Wed Jan 15 07:58:28 PST 2014


I am using QGIS and wanted to install the QGIS Server.  I was looking at the following page for how to do an install: http://hub.qgis.org/projects/quantum-gis/wiki/QGIS_Server_Tutorial.  It has me get the installer from http://download.osgeo.org/osgeo4w/osgeo4w-setup.exe.  When I ran the install, I did an advanced installation and selected to install the Apache Webserver and the QGIS Server.  The instructions went on to say that for Windows installs you must change FastCGI to just the CGI in the httpd_qgis.conf file.  When I went to start apache, I get the following error:

C:\OSGeo4W\apache\bin>httpd.exe -k start -n "Apache OSGEO4W Web Server"
[Wed Jan 15 10:45:39 2014] [warn] module cgi_module is already loaded, skipping
Syntax error on line 4 of C:/OSGeo4W/httpd.d/httpd_qgis.conf:
Invalid command 'DefaultInitEnv', perhaps misspelled or defined by a module not included in the server configuration


The conf file looks like:

#LoadModule fcgid_module modules/mod_fcgid.so
LoadModule cgi_module modules/mod_cgi.so

DefaultInitEnv QGIS_PREFIX_PATH "C:\OSGeo4W\apps\qgis"
DefaultInitEnv TEMP "C:\Users\pal1\AppData\Local\Temp"
DefaultInitEnv PATH "C:\OSGeo4W\bin;C:\OSGeo4W\apps\qgis\bin;C:\OSGeo4W\apps\grass\grass-6.4.3\bin;C:\OSGeo4W\apps\grass\grass-6.4.3\lib;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem"

Alias /qgis/ C:\OSGeo4W/apps/qgis/bin/

<Directory "C:\OSGeo4W/apps/qgis/bin/">
    #SetHandler fcgid-script
    SetHandler cgi-script
    Options ExecCGI
    Order allow,deny
    Allow from all
</Directory>

There are three lines that use the DefaultInitEnv declaration and it will bomb out on the first one that is listed (I switched the order to see if it was one in particular).  

So, does anyone know where DefaultInitEnv is suppose to be defined as per the error message.  Not sure what I may be missing from this installation that is creating this failure.

Thanks - Peter



More information about the Qgis-user mailing list