[Qgis-user] QGIS server in professional use?

Richard Greenwood richard.greenwood at gmail.com
Sun Oct 17 19:31:24 PDT 2021


Posting again without screenshot, which apparently caused my previous email
to await moderator approval.

Mats,

I fired up a new Ubuntu 20.04 instance on AWS and did the following 5 steps
which got me an XML capabilities document.

# standard practice when starting a new instance
sudo apt update && sudo apt upgrade -y
# reboot if a new kernel was installed by apt upgrade
sudo reboot
# install qgis-server and apache web server
sudo apt install qgis-server apache2 libapache2-mod-fcgid
# enable apache fcgi and cgi
sudo a2enmod fcgi cgi
sudo systemctl restart apache2
# in a web browser you should now get an XML document from the following
request
http://IP-ADDRESS-OR-HOST-NAME
/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities

And 3 more steps got me a map

# load some test data
wget https://github.com/qgis/QGIS-Training-Data/archive/v2.0.zip
sudo apt install unzip
unzip v2.0.zip
# in a web browser you should get a map from the following request
http://IP-ADDRESS-OR-HOST-NAME
/cgi-bin/qgis_mapserv.fcgi?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities&MAP=/home/ubuntu/QGIS-Training-Data-2.0/exercise_data/qgis-server-tutorial-data/world.qgs&LAYERS=countries&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&CRS=EPSG:4326&WIDTH=400&HEIGHT=200&BBOX=-90,-180,90,180

The tutorial tries to cover a lot of ground, maybe too much. And the 8
steps above certainly don't cover enough for a production server. But it's
quite unfair to say that "QGIS Server is not ready for production". As
Donovan pointed out, there are a lot of moving parts and you have to have
some proficiency with all of them if you are doing it on your own.

The basic principle is that QGIS Server is serving WMS, WFS, WCS requests
via CGI (or Fast-CGI). Apache, Ngix, IIS, Tomcat all can serve CGI and
Fast-CGI. Pick whatever operating system and web server you're the most
proficient with. Install QGIS Server, start with the simplest configuration
that you can, as I did above. Then start tuning it to your needs. If you
run into problems ask for help on the list or
https://gis.stackexchange.com/ with
specific details as to what the problem is.

-- 
Richard W. Greenwood
www.greenwoodmap.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20211017/9bcba392/attachment.html>


More information about the Qgis-user mailing list