Sub-Server isn't fully removed

SYSTEM INFORMATION
OS type and version Ubuntu Linux 20.04.6
Usermin version 2.102
Virtualmin version 7.20.2
Theme version 21.20.7
Nginx version 1.18.0
Package updates All installed packages are up to date

I have create an VirtualServer and removed it afterwards.
From GUI perspective, anything should be removed at least:

but it isn’t!! If I do a fulltext-search on CLI I got many entries for this VirtualServer:

 grep -irl "z8nq3v"
.etckeeper
shadow-
webmin/logviewer/units.cache
passwd-
.git/index
nginx/sites-available/z8nq3v.xlivery.shop.conf
nginx/sites-available/z8nq3v-files.xlivery.shop.conf

Any Idea, why a virtualhost is not fully removed, and how to fix this?

1 Like

I think this is specific to nginx and have seen the same, (I just ignored it as it did not seem to impact other VS) - I must go back and tidy-up those .conf files.

I suspect it is a hangover from the diffs with Apache.

@Stegan
Ok, thanks for your reply.
Is there any " Execute Script after Subserver-Removal" Hook in Virtualmin.

If so, I could simply add a script there to do the cleanup

Sorry. no idea :man_shrugging:

I’ve just been in and manually removed those .conf files. I guess the units.cache has been updated since ?

it was a few months ago might even have been on an earlier version of Webmin

I’ve found that the remaining files not happen on all VM’s
I can not reproduce why those “earlier” created SubServers are not fully removed, but if I create a new Subserver now via bash-script:

  virtualmin create-domain --parent "$parent_domain" --domain "$domain" --virtualmin-nginx --virtualmin-nginx-ssl --dir --field-CustomerNo "unassigned" --field-CustomerEmail ""

it work like expected - means all files removed - if I do remove this subserver via Virtualmin GUI.

So for me it’s currently solved, but I will keep an eye on it if it appears again. Then I will try to reproduce why it’s happen

@suther,

Have you confirmed these directories and/or files actually exist or just can be searched?

Some of them appear to be “cached” data, that’ll likely clear up themselves at some point (though I cannot confirm as I don’t use Nginx).

That might explain that it sometimes seems to work and sometimes not.
I’ll remove some of them and will wait & see if they are fully removed afterwards.

How long does the caching may take effect? Any Idea?

BTW: Is there any change to remove multiple sub-servers of a Server at once?

@suther,

When you say files aren’t being removed, are you suggesting the “home” directory (ex. /home/username) is not being destroyed?

grep -irl “z8nq3v”

.etckeeper

This looks like a config file for “etckeeper” program.

https://ubuntu.com/server/docs/etckeeper

shadow-

This “might” be a backup of the “shadow” file typically located in “/etc” folder, though you haven’t provided a full path so this is just an assumption. It’s possible a backup is being created while the system is editing the “shadow” file. The shadow file is a system “password” file which stores data in a hashed format.

webmin/logviewer/units.cache

This looks like a cached file used for something related to Webmin.

passwd-

Like the “shadow” file, this is likely a backup of the “passwd” file used to store user data by the system.

.git/index

This looks like a file create by “git”, though again you haven’t provided a full path so it could be located anywhere for any purpose.

nginx/sites-available/z8nq3v.xlivery.shop.conf

This appears to be the Virtual Host configuration created by Nginx for a site. It’s possible that the site is simply being disabled and not deleted. Perhaps a bug, but perhaps intentional.

nginx/sites-available/z8nq3v-files.xlivery.shop.conf

This appears to be the Virtual Host configuration created by Nginx for a site. It’s possible that the site is simply being disabled and not deleted. Perhaps a bug, but perhaps intentional.

It’s just the “.conf”-Files in /etc/nginx/sites-available & sites-enabled.
The other stuff are like you noticed just cache- and versioning files (which are ok to keep this stuff as it’s “history”.

@suther,

Hmm, if at the least “sites-enabled” config isn’t being removed, perhaps this looks like a bug.

@Joe what are your thoughts?

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.