Bit of an odd one, this. I've migrated a website from my old server to a new machine. Both servers run Ubuntu + Apache2. Both only serve a single site, apart from the default site.
I've flipped the domain name to the new IP address.
The trouble is that after moving the virtual host config over into sites-available, with the necessary link in sites-enabled, Apache attempts to serve from the default web root (/var/www) rather than the actual site content (in /var/www/technology). So for example, an attempt to browse to
.. gives a 404, and a message in the error log shows that it attempted to find /var/www/wiki.
Similarly, browsing to technology.smeg.com gives the default site index page.
ScriptAlias /support/ /usr/lib/cgi-bin/
ScriptAlias /lookuptable/ /usr/lib/cgi-bin/
AddHandler cgi-script .cgi
Now, I can "fix" this by removing the 000-default entry from sites-enabled. If I do that, Apache will serve the correct content from /var/www/technology.
But that kills the default site, which I want to keep, and I didn't have to do that on the old box. It also destroys some default settings used by the virtual host, I think.
I've changed the domain name to protect the innocent.
.. ah never mind .. just fixed it! I noticed that the 'default' file linked from 000-default is different on the older server. When I replaced the line:
.. to match the old server, then restarted - it all works.
Will post this anyway, in case it helps someone else.