Qgis-server...Installation on Ubuntu 16.04 LTS
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> ...