[GIS] How to install QGIS Server Ubuntu 12.04

apacheerrorqgis-serverUbuntu

I am new user to Ubuntu (12.04) and am trying to set up QGIS server. I have QGIS desktop installed and working.

In regards to QGIS server I have used

apt-get install qgis-mapserver libapache2-mod-fcgid

and was successful but when I try the GetCapabilities request it fails and also when I try start/stopping apache2 I get the error "No Apache MPM package installed". Do I need to configure the apache2.conf file for this to work? Thanks for your time.

Below is example of error.

ben@ubuntu:~$ aptitude search apache2-mpm-
p   apache2-mpm-event               - Apache HTTP Server - event driven model   
p   apache2-mpm-itk                 - multiuser MPM for Apache 2.2              
p   apache2-mpm-prefork             - Apache HTTP Server - traditional non-threa
p   apache2-mpm-worker              - Apache HTTP Server - high speed threaded m
ben@ubuntu:~$ /etc/init.d/apache2 start
No apache MPM package installed

Best Answer

I have faced the same problem: "Internal Server Error with Ubuntu 12.04". Everything looked OK to me (I even run successfully a perl fcgi script to test FCGI in my apache server). I continually got an Internal Server Error when I run a get Capabilities request. The apache log file said "Premature end of script headers: qgis_mapserv.fcgi".

The problem was solved when I included a previous QGIS generated project file into the cgi folder (in my apache installation was /usr/lib/cgi-bin). Apparently, the qgis server searches for a project in the cgi folder and the error comes out if there is no project.