How to properly delete domain after cloning-mishap?

1 post / 0 new
#1 Sat, 02/23/2019 - 10:26

How to properly delete domain after cloning-mishap?


Im on Centos 7.

1) I ran "clone-domain" for one of my domains via ssh. I was trying to clone parent domain( to child domain ( After doing this i realized that i had actually created new parent domain named with file directory /home/mishap/ . I deleted this from virtualmin UI. I think it crashed during the delete command but i did not notice if there was any errors.

2) I then created sub-domain properly via UI and everything seemed OK until the script restarted the server. Then i was not able to access any of my domains nor virtualmin UI via browser anymore.

3) Then i checked my apache conf file (etc/httpd/conf/httpd.conf). The mishap-domain that i had cloned previously and had deleted from virtualmin UI already, most of the host code was still there, but it had only end tag but there was no start tag for this. I deleted all code regarding to this.

4) After this i was able to connect to my domains but to not to my virtualmin UI. Before i was restarting via hosting providers support page, but then i tried to restart using "/etc/init.d/webmin restart" and i got: Failed to open SSL key /home/mishap/ssl.key at /usr/libexec/webmin/ line 4434.

5) My /home/myshap/ directory was still there but it had no ssl files so i copied ssl cert files from another domain folder and now i can access my virtualmin UI.

Now everything is working but i still have this /home/myshap/ folder with copied ssl cert files and i am afraid it can cause me problems in the future. How can i clean this up? I tried to use 'virtualmin delete-domain' but this does not work obviously because the script had been started before from the UI but it probably crashed.

Hope someone is willing to point me in the right direction on how to clean all traces to this domain from my system.