Rename-domain getting reverted

SYSTEM INFORMATION
OS type and version AlmaLinux 9.6
Webmin version 2.520
Virtualmin version 7.50.0 Professional

When I rename a site using either the rename-domain program or through the web UI under Manage Virtual Server > Change Domain Name, it appears to go through successfully. It displays the correct name in the UI and I can query information about the domain. However, when I check a few minutes later it’s reverted back to the original domain name.

I’m not able to replicate this every time a domain name is changed and haven’t been able to identify any differences in the domains that it happens for. If I try again once or twice most times it will stick.

We have multiple virtualmin servers and it’s happened on at least two of them. Any ideas where to start to look to troubleshoot this?

That would be really weird. I’ve never seen it happen. Tell us more if you find anything useful or can reproduce this issue.

Moreover take a look at the “Recent Logins” activity on the Dashboard and the “Webmin Actions Log” to get a better idea of what’s going on.

This is really odd. I’m still not able to consistently replicate this but when it happens the virtual hosts do not get reverted.
Example: I created domainnamechangetest.com then renamed it to testingstuff.com. It appears to go through successfully, but then I reload and virtualmin displays the old name. However, when I look in the httpd.conf I can still see the new testingstuff.com, at this point backups also start to fail because of “no Apache virtual host found”. If I look at the “Webmin Actions Log” I can see the change from domainnamechangetest.com to testingstuff.com but no records of it changing back.

It seems like a cosmetic caching issue. Where do you see it exactly? And does clicking the right side slider, cog icon (bottom right), and clearing the cache from the dropdown fix the issue?

Also, how did you rename the domain?

Clearing the cache doesn’t fix the issue, I’m still seeing it displayed as the old name, while virtual hosts shows the new name.

This time the domain was renamed from the UI under Manage Virtual Server > Change Domain Name.

I’ve also seen the issue using the modify-domain program with the --newdomain flag.

Where exactly do you see it?


I’m seeing it in the list of virtual servers, but that domain is missing from the httpd.conf.

You said the actual config was just right?

The httpd.conf was updated to the new “testingstuff.com” domain

At first you said:

Now you’re saying:


So, I’m confused.

The original domain name “domainnamechangetest.com” was renamed to “testingstuff.com

domainnamechangetest.com” now displays in the virtualmin UI and “testingstuff.com” does not.

testingstuff.com” is in the httpd.conf but “domainnamechangetest.com” is not.

This doesn’t seem to be just a display issue. Scheduled backups are also trying to backup the original domain name “domainnamechangetest.com” but seem to be failing because the virtual host is not found.

Creating backup for virtual server domainnamechangetest.com ..
Copying virtual server configuration ..
.. done
Backing up Cron jobs ..
.. none defined
Saving mail aliases ..
.. done
Saving mail and FTP users ..
.. done
Backing up mail and FTP user Cron jobs ..
.. none to backup
Backing up Dovecot control files ..
.. none found
Copying Apache virtual host configuration ..
.. no Apache virtual host found!
Copying SSL Apache virtual host configuration and certificate ..
.. no Apache virtual host found!
Copying Logrotate configuration ..
.. no log rotation configuration found for
Copying MySQL user details ..
.. done
Dumping MySQL database domainnamechangetest ..
.. done
Backing up Webmin ACL files ..
.. done
Backing up AWStats configuration file ..
.. no configuration file found!
Creating TAR file of home directory ..
.. done
.. completed in 5 seconds

Do you have anything custom configured on your system? Anything at all?

And, what options did you select on the “Manage Virtual Server ⇾ Change Domain Name” page before submitting it?

I don’t believe there is anything custom. And just these default options on the change domain name page:

That’s strange. I can’t reproduce it.

Have you made any custom changes to your system?

Nothing custom except we use mysql instead of mariadb.

I’m also seeing this issue occur. It appears that sometimes after a domain name change, (done through either remote.cgi or the UI) the “dom=” in the site config in /etc/webmin/virtual-server/ is not being updated with the new domain. Are the files in /etc/webmin/virtual-server/ read during backups? That might explain why backups are failing. This does not happen on every domain change - I’ve yet to find a way to consistently have this fail.

@Jamie, do you know what’s going on here?

This sounds like a locking bug - if some other Virtualmin cron job or UI action modifies the same domain that’s being renamed, it could cause the domain file to be over-written with old data.