Apache2 - virtual host defaulting to default host
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.
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:
Will post this anyway, in case it helps someone else.
To get this of the zero-reply list
Thanks for the solution. Can you please mark the tread as solved using the thread tools just above the first post; this might help others that are looking or solutions for the same problem.
|All times are GMT -5. The time now is 02:31 AM.|