[ENSIM] Manually deleting a site
Sometimes, when trying to delete a site on Ensim, it will fail. If you cannot delete the domain through the interface, or via the DeleteVirtDomain command, try the following steps (as root):
- First find out the site and admin number of this domain by using the following command:
sitelookup -d domain.com site_handle,wp_user
Use the appropriate numbers in all the commands that follow rm -rf /home/virtual/site#rm -f /home/virtual/admin#rm -f /home/virtual/domain.comrm -f /etc/httpd/conf/virtual/site#rm -rf /etc/httpd/conf/site#.previewrm -f /etc/httpd/conf/virtual.preview/site#rm -rf /etc/httpd/conf/site#rm -f /etc/webalizer/domain.comuserdel admin#- Log into the PostgreSQL database:
psql appldb
Within the PSQL session, do the following queries (where X is the site/admin number):
appldb=> delete from users where site_id = X;appldb=> delete from reseller where site_id = X;appldb=> delete from bandwidth_log where site_id = X;appldb=> delete from bandwidth_spans where site_id = X;appldb=> delete from bandwidth where site_id = X;appldb=> delete from ipinfo where site_id = X;appldb=> delete from diskquota where site_id = X;appldb=> delete from telnet where site_id = X;appldb=> delete from apache where site_id = X;appldb=> delete from ssh where site_id = X;appldb=> delete from siteinfo where site_id = X;appldb=> (type Ctrl-D to quit)
- Then, check through all text files in
/etc/virtualhosting/mappings/and remove any lines that refer to site# or domain.com. Use the following command to find references:
cd /etc/virtualhosting/mappings/; grep -l site# * - Finally, restart apache and webppliance:
service httpd restart; service webppliance restart
This was taken from forum.ensim.com, and was originally written by 'mouse'.
back