[GIS] error setting up QGIS server with apache 2.4

apacheqgisqgis-server

I keep getting the 403 error and I have followed the directions from here. Anyone know what's wrong?

Adding QGIS Server to an existing Windows web server

I set the httpd_gis.conf to require all granted

<pre>LoadModule fcgid_module modules/mod_fcgid.so</pre>

FcgidInitialEnv PATH "C:\OSGeo4W64\bin;C:\OSGeo4W64\apps\qgis\bin;C:\OSGeo4W64\apps\grass\grass-6.4.3\bin;C:\OSGeo4W64\apps\grass\grass-6.4.3\lib;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem" DefaultInitEnv QGIS_PREFIX_PATH "C:\OSGeo4W64\apps\qgis" DefaultInitEnv QT_PLUGIN_PATH "C:\OSGeo4W64\apps\qgis\qtplugins;C:\OSGeo4W64\apps\qt4\plugins" DefaultInitEnv TEMP "C:\Users\mtenold\AppData\Local\Temp"

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

<Directory "C:\OSGeo4W64/apps/qgis/bin/">
    #SetHandler fcgid-script
    SetHandler cgi-script
    Options ExecCGI     Require all granted </Directory>

and I copied the httpd_gis.conf into the apache\httpd.d folder. However when I try and run this request
http://localhost/qgis/qgis_mapserv.fcgi.exe?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities

I get the 403 error

If I type localhost into the browser, I see the screen that says "It works". So I know the Apache server is working.

Best Answer

This worked fine on my windows2008 r2. Take care of the paths.

LoadModule cgi_module modules/mod_cgi.so

SetEnv PATH "C:\OSGeo4W64\bin;C:\OSGeo4W64\apps\qgis\bin;C:\OSGeo4W64\apps\grass\grass-6.4.3\bin;C:\OSGeo4W64\apps\grass\grass-6.4.3\lib;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem"
SetEnv QGIS_PREFIX_PATH "C:\OSGeo4W64\apps\qgis"
SetEnv QT_PLUGIN_PATH "C:\OSGeo4W64\apps\qgis\qtplugins;C:\OSGeo4W64\apps\qt4\plugins"
SetEnv TEMP "C:\Users\ADMINI~1\AppData\Local\Temp"

Alias /qgis/ C:\OSGeo4W64/apps/qgis/bin/<Directory "C:\OSGeo4W64/apps/qgis/bin/">
    SetHandler cgi-script
    Options ExecCGI
    Require all granted
</Directory>
Related Question