This post follows on from my previous three (most recent first in list) linked below. There is no doubt that in just a short time from now we will probably see a 'one-click' installer to by-pass the next steps but a least this method allows you to change 'in/out' the individual libraries if there is are updates using the usual ' sudo apt update && sudo apt upgrade '. http://www.paulshapley.com/2016/08/qgis-server-bringing-map-into-browser.html http://www.paulshapley.com/2016/07/how-to-install-qgis-server-on-ubuntu.html http://www.paulshapley.com/2016/04/how-to-install-postgresql-95-and.html 1. Firstly...Create a new QGIS project, add your layers from PostGIS, Shapefiles or raster (geotiff), style and symbolise those layers, set the projection and ensure you've set up your 'OWS Server' in 'Project Properties'. 2. Let's install the 'Lizmap' Plugin first by going into the 'Plugins' menu then 'Manage
Before we start it is always a good idea to remove and re-install apache2 web server so that we start from the same set up:- To remove Apache2:- $ sudo apt --purge remove apache2 $ sudo apt autoremove To re-install Apache2:- $ sudo apt install apache2 $ sudo /etc/init.d/apache2 restart # or $ sudo service apache2 restart 1. $ sudo apt install apache2 (if not installed already done so as above) 2. $ sudo apt install qgis-server libapache2-mod-fcgid 3. $ sudo a2enmod fcgid 4. $ sudo a2enconf serve-cgi-bin 5. $ sudo service apache2 restart 6. add the following code and don't forget to save the changes:- ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ <Directory "/usr/lib/cgi-bin/"> Options ExecCGI FollowSymLinks Require all granted AddHandler fcgid-script .fcgi </Directory> into /etc/apache2/sites-available/ 000-default.conf $ sudo gedit /etc/apache2/sites-available/000-default.conf # so that it looks like this:- <VirtualHost *:80>
So you have your 'GetCapabilities' xml displaying in your browser working as in my post of Friday 22nd July 2016 http://www.paulshapley.com/2016/07/how-to-install-qgis-server-on-ubuntu.html NO?...here are some issues to check back in the QGIS project file before we move on. Check the 'Project Properties' under the 'Project' menu, go to the 'OWS server' tab. Below is an example of of how I've set up mine. and here is the bottom bit you cannot see in the above image... Ensure under 'Save Paths' in the 'General' Tab it is set to 'relative'. Note that the layers you are going to select for the WMS service are ticked under 'Published' in the WFS capabilities table. Moving on to setting up your 'Add layer(s) from WM(T)S Server' button on the 'Manage Layers Toolbar' Ensure your url is pointing at 'http://yourhost/cgi-bin/project/qgis_mapserv.fcgi?'it i
Comments
Post a Comment