fedlerner

Active Member
Oct 31, 2007
33
0
56
Argentina
I work for a hosting company where we have lots of accounts on our servers. Sometimes when terminating accounts the httpd.conf doesn't get updated correctly, and we need to fix the problem manually.
The problem is that the terminated user VH isn't removed from the Apache config file.
Ex:
Code:
<VirtualHost *.*.*.*:80 >
ServerName........
ServerAlias..........
.............
(A common VirtualHost).

Is there a script or a way so you can put for example: /scripts/removevh USER and it removes all the virtualhost instances for that user on the httpd.conf ?


Thanks,
Fed.
 

cPanelKenneth

cPanel Development
Staff member
Apr 7, 2006
4,607
80
458
cPanel Access Level
Root Administrator
I work for a hosting company where we have lots of accounts on our servers. Sometimes when terminating accounts the httpd.conf doesn't get updated correctly, and we need to fix the problem manually.
The problem is that the terminated user VH isn't removed from the Apache config file.
Ex:
Code:
<VirtualHost *.*.*.*:80 >
ServerName........
ServerAlias..........
.............
(A common VirtualHost).

Is there a script or a way so you can put for example: /scripts/removevh USER and it removes all the virtualhost instances for that user on the httpd.conf ?


Thanks,
Fed.
If you are using the account termination functions provided by cPanel, then rebuilding the httpd.conf (e.g. /scripts/rebuildhttpdconf) should generate a file with the VHosts removed.

That said, those VHosts should not remain, regardless. What is your full cPanel version number? How are you removing the accounts? What errors (if any) are reported during the removal process?
 

fedlerner

Active Member
Oct 31, 2007
33
0
56
Argentina
WHM 11.23.2 cPanel 11.23.6-R27225.

This happens when removing accounts from WHM or SSH. If I'm removing many accounts, or (I think/assume) if while I'm removing an account another thing is happening on the server (Ex: Account being created, account being suspended, or if the server is with a bit high load)...
No error is shown, all stuff shows as if it was done correctly.