Credits: 3Liz, https://github.com/3liz João Gaspar, https://github.com/jonnyforestGIS
Last Tested on: QGIS Server 3.28.11 LTR + PHP 8.2 + LizMap Web Client 3.6.6
The following guide assume that the user will keep the suggested installation/deploy paths. If there is the necessity to use custom installatin/deploy paths then a number of configuration files (Apache, PHP) will need to be modified. This guide also assumes that on the Windows machine being used there aren't any other programs/services running on port 80.
-
Download the OSGeo4W installer: https://download.osgeo.org/osgeo4w/v2/osgeo4w-setup.exe
-
Use the "advanced" install method. Install the packages "qgis-ltr", "qgis-ltr-server" and "fcgi", let the installer manage the installation of dependencies. Use the default installation path:
C:\OSGeo4W
- Download the file https://github.com/NaturalGIS/qgis_server_and_lizmap_on_windows/archive/refs/heads/master.zip unzip it and copy the "webserver" folder inside the C: drive
- Start the Apache web server by running as administrator (right click > run as administrator) the file
C:\webserver\Apache24\bin\httpd.exe
At this point you could see this message from Windows firewall: allow Apache to serve pages through it.
- As option Apache can be installed as Windows service by running (from the Windows console, launched as administrator) the following command:
C:\webserver\Apache24\bin\install-server.bat
After that Apache can be started/stopped from the Windows Services control panel or from the Windows console using the command (as administrator):
C:\webserver\Apache24\bin\start-server.bat
- Open a browser and test if Apache works:
http://localhost
- Test if PHP works:
http://localhost/info.php
- Test if QGIS Server works:
http://localhost/qgis/qgis_mapserv.fcgi.exe
- Test if Lizmap Web Client works:
http://localhost/lizmap36/lizmap/www/index.php
http://localhost/lizmap36/lizmap/www/index.php/view/map?repository=demos&project=montpellier
- On a completely clean Window 10/11 machine you can get an error message about missing some library. If is the case just download and install them from the MS web site: https://www.microsoft.com/en-us/download/details.aspx?id=52685