[Qgis-user] Configuring QGIS server on Ubuntu 20.4

B. De Mezzo benoit.de.mezzo at oslandia.com
Wed Oct 13 03:14:33 PDT 2021


Hi Mats

I just react now about this topic.

Thank to (try to) use qgis server! The more we are, the better!

By the way as you mentioned, the documentation may need some adjustments
to increase the success of first deployments. There are, indeed, some
misprint to fix as the reference to `|myhost.conf`| (which is
qgis.demo.conf) or|
|

*In the following, please replace localhost with the name or IP
address of your server.*

But the name qgis.demo is just an example of host, if your host is
geonet.se you should create an apache virtualhost with this hostname in
ServerName directive.

Apache will only redirect access to qgis server if the host on the url
matches the virtualhost ServerName.

Also to avoid to show the qgis project filename and path in the url you
can use the apache rewrite module:

Activate `ReWrite` module:
> ln -s /etc/apache2/mos-available/rewrite.load /etc/apache2/mod-enabled/

And add in your virtualhost:
  RewriteEngine On
  RewriteRule ^/qgis/(.+)$
/cgi-bin/qgis_mapserv.fcgi?MAP=/home/qgis/projects/$1.qgz [QSA]
  

Then after reloading apache you should access to your qgis server with
this url:

http://geonet.se/qgis/my_12?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetCapabilities

Regards


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20211013/a1575f3e/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 236 bytes
Desc: OpenPGP digital signature
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20211013/a1575f3e/attachment.sig>


More information about the Qgis-user mailing list