Problem setting default website

I'm attempting to set a different default website for Debian a server. Upon going into Server Configuration -> Website Options, and setting "Default Website for IP", I'm seeing this error:

Making website the default ..
.. failed : Cannot handle swap between /etc/apache2/sites-enabled/web3.redhost.dk.conf and /etc/apache2/sites-enabled/baadservice.dk.conf

Is there any additional information I can provide regarding the issue?

Status: 
Closed (fixed)

Comments

Hi Eric,

Do either of those files perhaps contain more than one domain's websites? That is usually the cause of this error ..

Howdy -- well, the Virtual Server I was trying to mark as the "default" does contain two VirtualHost sections -- the second of which is for SSL. Could that be causing the issue? And if so, is there a way around it?

I thought of another possible cause - in your /etc/webmin/apache/config file, what does the virt_file line contain exactly? It should be /etc/apache2/sites-enabled with no extra spaces or slashes ..

The virt_file setting looks like:

virt_file=/etc/apache2/sites-available

Actually, that looks fine..

Are both the files /etc/apache2/sites-enabled/web3.redhost.dk.conf and /etc/apache2/sites-enabled/baadservice.dk.conf symlinks to files with the same name in the /etc/apache2/sites-available directory? That's the way per-domain files are usually setup on Debian..

Egads, none of the files in sites-enabled are symlinks! :-)

Now, the the conf file in sites-enabled and sites-available for both web3.redhost.dk.conf and baadservice.dk.conf are the same.

However, with it being two separate files, and not symlinks, could that be the cause of the issue?

And further, any idea what in the world could have happened to cause none of those to be symlinks? :-)

Those sites were all recently migrated via Cloudmin, and on the original server, they're correctly setup with symlinks.

Is it possible something about the migration/restore procedure is generating those incorrectly?

Yes, those should be symlinks .. are they perhaps hard links on your system ?

If you create a new domain, does it get a symlink in sites-enabled from sites-available ?

Okay, just tested that -- creating a new Virtual Server does indeed set things up using a symlink:

lrwxrwxrwx 1 root root   58 2010-03-31 16:56 erictest.web3.redhost.dk.conf -> /etc/apache2/sites-available/erictest.web3.redhost.dk.conf

The rest of the links don't appear to be hard links. I added some comments to a file in sites-enabled and it only shows up in that file, not the correlating file in sites-available.

Wierd .... so how did those problem files get onto the system? Via a backup and restore?

Hi Jamie -- it was via a Cloudmin migration, migrating the Virtual Servers on one set of physical servers to servers in another datacenter.

It was migrating just Virtual Servers running on a physical server, there aren't VPS's in use there.

Since I didn't perform the migration myself, I sent a request to the person who did to walk us through exactly what steps he used to do that.

Okay, he handled the move by going into Cloudmin -> System Configuration -> Virtualmin Domains, and used "Move Domains" to migrate the Virtual Servers in a few large batches from their current server to the new one.

Ok, that really just does a backup and restore.

Was the source system also Debian?

Correct, the source system is the same Debian version (5.0/Lenny).

Do you still have access to this system? It would be useful to know if creating and then transferring a test domain also triggers this problem ..

Do you still have access to this system?

As a matter of fact I do! For 2 more weeks or so.

I'm more than happy to try any tests, though at any point you're certainly welcome to take a peek at it yourself.

So to get things started, what would you like me to try... create a test domain on the old server, use Cloudmin to move it to the new server, and simply see if we continue to see that same issue with the symlinks (or lack thereof)?

Yeah, try creating a test domain on the source system, verifying that it's sites-enabled and sites-available files look OK (the latter should be a link to the former), then moving it to the new system and re-checking those files.

If that still breaks, I'd love to login and take a look.

Yeah, try creating a test domain on the source system, verifying that it's sites-enabled and sites-available files look OK (the latter should be a link to the former), then moving it to the new system and re-checking those files.

If that still breaks, I'd love to login and take a look.

Oddly, I can't seem to reproduce this issue.

And if I can't reproduce it, there's certainly no way to fix it :-)

I'll go ahead and close this -- I'll re-open it if it occurs again.

Ok, thanks ..

I seem to recall someone else reporting something similar a few weeks ago, but again it was impossible to re-produce.