I can reproduce this error in Percise. What's happening is that apache is being restarted a second time to soon. I've included the postinst script output below. To test the theory I ran 'invoke-rc.d apache2 restart;invoke-rc.d apache2 restart' - the second restart failed. If I add a sleep 'invoke-rc.d apache2 restart; sleep 1; invoke-rc.d apache2 restart' then the second restart succeeds. The postinst script could be changed so that it would only ever call restart once. Looks like there is already a bug files against apache https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1018171 bash -x /var/lib/dpkg/info/puppetmaster-passenger.postinst configure + set -e + '[' configure = configure ']' + dpkg-statoverride --list /usr/share/puppet/rack/puppetmasterd/config.ru + '[' '' = '' ']' ++ puppet config print hostcert + '[' '!' -e /var/lib/puppet/ssl/certs/example.com.pem ']' ++ puppet config print ++ wc -l ++ grep 'Could not parse' + '[' 0 '!=' 0 ']' + APACHE2_SITE_FILE=/etc/apache2/sites-available/puppetmaster + '[' '!' -e /etc/apache2/sites-available/puppetmaster ']' + a2enmod ssl Module ssl already enabled + a2enmod headers Module headers already enabled + a2ensite puppetmaster Site puppetmaster already enabled + '[' -x /etc/init.d/apache2 ']' ++ which invoke-rc.d + '[' -x /usr/sbin/invoke-rc.d ']' + invoke-rc.d apache2 restart * Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using example.com for ServerName [Wed Jul 04 10:54:55 2012] [warn] NameVirtualHost *:80 has no VirtualHosts ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using example.com for ServerName [Wed Jul 04 10:54:56 2012] [warn] NameVirtualHost *:80 has no VirtualHosts [ OK ] + dpkg --compare-versions '' lt-nl 2.6.1-1 + dpkg --compare-versions '' le 2.7.11-1 + APACHE2_SITE_FILE=/etc/apache2/sites-available/puppetmaster + '[' -e /etc/apache2/sites-available/puppetmaster ']' + sed -r -i 's|/etc/puppet/rack|/usr/share/puppet/rack/puppetmasterd|' /etc/apache2/sites-available/puppetmaster + a2enmod headers Module headers already enabled + '[' -x /etc/init.d/apache2 ']' ++ which invoke-rc.d + '[' -x /usr/sbin/invoke-rc.d ']' + invoke-rc.d apache2 restart * Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using example.com for ServerName [Wed Jul 04 10:54:57 2012] [warn] NameVirtualHost *:80 has no VirtualHosts apache2: Could not reliably determine the server's fully qualified domain name, using example.com for ServerName [Wed Jul 04 10:54:57 2012] [warn] NameVirtualHost *:80 has no VirtualHosts (98)Address already in use: make_sock: could not bind to address 0.0.0.0:80 no listening sockets available, shutting down Unable to open logs [fail] invoke-rc.d: initscript apache2, action "restart" failed. + exit 1