Submitted by andreychek on Sun, 03/28/2010 - 15:31
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
Submitted by JamieCameron on Sun, 03/28/2010 - 19:48 Comment #1
Hi Eric,
Do either of those files perhaps contain more than one domain's websites? That is usually the cause of this error ..
Submitted by andreychek on Sun, 03/28/2010 - 19:59 Comment #2
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?
Submitted by JamieCameron on Sun, 03/28/2010 - 20:19 Comment #3
I thought of another possible cause - in your
/etc/webmin/apache/config
file, what does thevirt_file
line contain exactly? It should be/etc/apache2/sites-enabled
with no extra spaces or slashes ..Submitted by andreychek on Sun, 03/28/2010 - 20:23 Comment #4
The virt_file setting looks like:
virt_file=/etc/apache2/sites-available
Submitted by JamieCameron on Sun, 03/28/2010 - 23:29 Comment #5
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..Submitted by andreychek on Mon, 03/29/2010 - 10:56 Comment #6
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?
Submitted by JamieCameron on Mon, 03/29/2010 - 12:21 Comment #7
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 ?
Submitted by andreychek on Wed, 03/31/2010 - 10:02 Comment #8
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.
Submitted by JamieCameron on Wed, 03/31/2010 - 13:50 Comment #9
Wierd .... so how did those problem files get onto the system? Via a backup and restore?
Submitted by andreychek on Wed, 03/31/2010 - 14:00 Comment #10
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.
Submitted by andreychek on Wed, 03/31/2010 - 14:17 Comment #11
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.
Submitted by JamieCameron on Wed, 03/31/2010 - 18:29 Comment #12
Ok, that really just does a backup and restore.
Was the source system also Debian?
Submitted by andreychek on Wed, 03/31/2010 - 22:47 Comment #13
Correct, the source system is the same Debian version (5.0/Lenny).
Submitted by JamieCameron on Wed, 03/31/2010 - 23:42 Comment #14
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 ..
Submitted by andreychek on Wed, 03/31/2010 - 23:46 Comment #15
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)?
Submitted by JamieCameron on Thu, 04/01/2010 - 00:04 Comment #16
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.
Submitted by JamieCameron on Thu, 04/01/2010 - 00:30 Comment #17
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.
Submitted by andreychek on Fri, 04/09/2010 - 11:46 Comment #18
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.
Submitted by JamieCameron on Fri, 04/09/2010 - 14:05 Comment #19
Ok, thanks ..
I seem to recall someone else reporting something similar a few weeks ago, but again it was impossible to re-produce.