Thanks for that detailed response Andy. Like you, I don't tend to alter config files, but maybe I did something when I set up my server. All's working well, that's the main thing.

Barry


On 5 October 2013 18:40, Andy Smith <andy@bitfolk.com> wrote:
Hi Barry,

On Fri, Oct 04, 2013 at 07:56:42PM +0100, Barry Watson wrote:
> I got round to upgrading to Wheezy earlier. All went well but when I
> restarted apache2 the restart failed with the message that it couldn't find
> httpd.conf.

The /etc/apache2/apache2.conf file as shipped by Debian squeeze
includes this:

    # Include all the user configurations:
    Include /etc/apache2/httpd.conf

and the /etc/apache2/httpd.conf file as shipped by Debian squeeze
merely contains:

    # This is here for backwards compatability reasons and to support
    #  installing 3rd party modules directly via apxs2, rather than
    #  through the /etc/apache2/mods-{available,enabled} mechanism.
    #
    #LoadModule mod_placeholder /usr/lib/apache2/modules/mod_placeholder.so

i.e. nothing.

> A search (using find) yielded no sign of httpd.conf so I guess I did
> the right thing, but I'd just like to confirm that there is indeed no
> httpd.conf in my VPS.

The /etc/apache2/apache2.conf file is owned by the package
apache2.2-common:

    $ dpkg -S /etc/apache2/apache2.conf
    apache2.2-common: /etc/apache2/apache2.conf

It is treated as a Conffile by this package:

    $ dpkg-query -W -f='${Conffiles}\n' apache2.2-common | grep 'apache2\.conf'
     /etc/apache2/apache2.conf 95c489c44ce638dca8c44be18ebc8353

which means that, when you come to upgrade the apache2.2-common
package, if your /etc/apache2/apache2.conf file is unmodified from
what was shipped in the package then it will give you the new
version of the file without asking.

However if your file has been changed (e.g. by you configuring
something in there) then it will instead ask you if you wish to have
the new version, keep the old version, or take a few other actions
like inspect a diff, etc.

So, I suspect what happened is that your /etc/apache2/apache2.conf
was previously modified by you, then you were asked if you wanted to
replace it during upgrade but you said no, so you kept the version
from Debian squeeze which refers to httpd.conf. Also that you have
at some point deleted /etc/apache2/httpd.conf. Possibly the upgrade
procedure deleted it if was never changed.

If that suspicion is correct then you will probably have an
/etc/apache2/apache2.conf.dpkg-dist lying about which would be the
new file that it wanted to install.

Some more info about Debian Conffile handling:

    http://raphaelhertzog.com/2010/09/21/debian-conffile-configuration-file-managed-by-dpkg/

Personally where possible I find it worth going out of my way to
avoid editing the Conffiles that .deb packages install, and instead
putting my edits into separate files. Many packages have facilities
for doing that. This reduces the number of decisions that need to be
made during a package upgrade.

Cheers,
Andy

--
http://bitfolk.com/ -- No-nonsense VPS hosting

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEAREDAAYFAlJQTycACgkQIJm2TL8VSQvidgCg/b+hKmIxtFZY97Cf8fYrqVBF
oFsAoL65rj22PNxK7NJpAqnwvL8gYIIJ
=Lg+q
-----END PGP SIGNATURE-----

_______________________________________________
users mailing list
users@lists.bitfolk.com
https://lists.bitfolk.com/mailman/listinfo/users