Let’s try to setup brand new QGIS Server 3.0 on Windows 10 and Apache Web Server.


Download XAMPP distribution  (you will also install PHP, probably you need it anyway). You can remove all other options as only installing Apache and PHP.

Test for Apache and PHP


QGIS Server 3.0

Download 64 bit OSGeo4W installer . Choose advanced installation, from web and then select QGIS Server from Web part. I also needed QGIS Desktop on that machine so I checked also QGIS Desktop.

Apache configuration

Edit httpd.conf file. In case of XAMPP you get Control Panel where it is really simple to do that.


change line:

ScriptAlias /cgi-bin/ "C:/xampp/cgi-bin/"


ScriptAlias /cgi-bin/ "c:/OSGeo4W64/apps/qgis/bin/"

QGIS Server configuration

change part:

<Directory "C:/xampp/cgi-bin"
  AllowOverride None
  Options None
  Require all granted


<Directory "c:/OSGeo4W64/apps/qgis/bin">
  SetHandler cgi-script
  AllowOverride None
  Options ExecCGI
  Order allow,deny
  Allow from all
  Require all granted

Cgi handler

change line:

AddHandler cgi-script .cgi .pl .asp


AddHandler cgi-script .cgi .pl .exe


insert at bottom of http.conf:

SetEnv GDAL_DATA "C:\OSGeo4W64\share\gdal"
SetEnv QGIS_AUTH_DB_DIR_PATH "C:\OSGeo4W64\apps\qgis\resources"
SetEnv PYTHONHOME "C:\OSGeo4W64\apps\Python36"
SetEnv PATH "C:\OSGeo4W64\bin;C:\OSGeo4W64\apps\qgis\bin;C:\OSGeo4W64\apps\Qt5\bin;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\Qt5\plugins"

That completes Apache configuration.


Restart Apache server (from XAMPP Control Panel) and open a GetCapabilities request to QGIS Server


You should receive standard WMS Capabilities XML response from QGIS Server.