3

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
3
  • I got Apache2 working. I did 3 things, not sure which solved the problem. First I ran 'apt-get install apache2-MPM-worker'; second I edited apache2.conf and removed the hash in front of ServerRoot; thirdly started apache2 with sudo (root) command at start, ie: '$ sudo /etc/init.d/apache2 start'. When I got to localhost I get the "It Works!". However when I run the QGIS Server GetCapabilities request (localhost/cgi-bin/…) I get the Internal Server Error.
    – Ben
    Apr 28, 2012 at 12:46
  • Still getting Internal Server Error when I run get Capabilities request.
    – Ben
    Apr 29, 2012 at 12:02
  • Given Ubuntu 12.04 is not yet fully supported with QGIS I have gone back to 11.1 - The GUI is not nearly as smooth though! Thanks for reading. This could be deleted if you like.
    – Ben
    May 2, 2012 at 11:20

2 Answers 2

7

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.

1
  • I do not have enough reputation to upvote "Davichu", but I would like to commend him for helping me solve my problem through his answer.
    – VanCity
    Apr 26, 2013 at 18:16
0

I had the same problem with you. I did

sudo apt-get install apache2-mpm-prefork

And it works.

So, I think your first thing that you did in the comment How to install QGIS Server Ubuntu 12.04? is the solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.