Due to different reasons, we may want to delete a Virtual Server in Virtualmin.
Note: Before proceeding, please be aware that once a Virtual Server is removed, all files, databases, and users are permanently deleted and cannot be restored without using a backup.
Here at Ibmi Media, as part of our Server Management Services, we regularly help our Customers to perform related Virtualmin queries.
In this context, we shall look into how we can delete a Virtual Server in Virtualmin.
To begin, make note that once we remove a Virtual Server, all files, databases, and users are permanently deleted and cannot be restored without a backup.
To do this successfully, simply follow the below steps:
Domain not listed under the virtual server
Recently, we had a client who was unable to create a domain "domain.com". He came across the error:
"Failed to create virtual server: The domain domain.com is already hosted by your Apache webserver"
He was unable to list the "domain.com" under the virtual server list to delete.
In such a case, we can delete the entry from the apache virtual host manually.
We simply edited the apache configuration file and remove the virtual host block for the "domain.com":
# vi /etc/httpd/conf/httpd.conf
In addition, we ensure to remove the corresponding user for the domain.
We can do that from the command line, or from Webmin -> System -> Users and Groups.
This article covers how to go about deleting a Virtual Server in Virtualmin. In fact, we need to make sure that we have a backup before we proceed to remove the Virtual Server.