I had some issues installing foswiki on Ubuntu 8.04 with apache2. You can read the long story in Support.Question56.

This item aims to address the failure to deal with the apache config file installation

I used apt-get install foswiki and got
...
Setting up foswiki (1.0.0-1) ...
/var/lib/dpkg/info/foswiki.postinst: 211: apache-modconf: not found
dpkg: error processing foswiki (--configure):
 subprocess post-installation script returned error exit status 127
Errors were encountered while processing:
 foswiki
E: Sub-process /usr/bin/dpkg returned an error code (1)
make: *** [foswiki] Error 100
root@tinkerbell:/home/configure#      

Had a further look at the code in the installer and found (line numbers are mine. Don't have much options on a remote login):
1        servers="apache apache-perl apache-ssl apache2"
2        for server in $servers; do
3                if [ -e /etc/$server/conf.d ]; then                               <===============
4                        includefile=/etc/foswiki/apache.conf
5                        if [ -e /etc/$server/conf.d/foswiki.conf ]; then
6                                rm -f /etc/foswiki/$server-conf.d-foswiki.conf_o
ld
7                                mv /etc/$server/conf.d/foswiki.conf /etc/foswiki
/$server-conf.d-foswiki.conf_old
8                        fi
9                        ln -s $includefile /etc/$server/conf.d/foswiki.conf
10                       if [ $server = "apache2" ]; then
11                               a2enmod  authn_file
12                               a2enmod  rewrite
13                       else
14                               apache-modconf $server enable authn_file           <=============
15                               apache-modconf $server enable rewrite
16                        fi
17                fi
18        done

Line two loops over a collection of servers and checks whether they exist by checking for the existence of /etc/$server/conf.d

And I have both an apache/conf.d and an apache2/conf.d

maybe you can check what is running, or use which apache and which apache2 to find out what is actually installed. On my installation which apache returns ''

regards... -- BramVanOosterhout - 15 Feb 2009

frustrating stuff really - there is no 'correct' way to detect what web server is to be used - but your which suggestion sounds a good one - thanks smile

-- SvenDowideit - 16 Feb 2009

added which to postinst for 1.0.4

-- SvenDowideit - 20 Mar 2009

The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads