grep -Rl USERNAME /var/cpanel/databases/
Note:
Delete all the entrys with the USERNAME and after that you can add the new cPanel username.(careful to not delete existing users)
Linux Hosting Tips & Tricks
grep -Rl USERNAME /var/cpanel/databases/
Note:
Delete all the entrys with the USERNAME and after that you can add the new cPanel username.(careful to not delete existing users)
/scripts/fixquotas
will say something like;
edquota: Quota write failed (id 526): Invalid argument
so to fix it;
/sbin/quotacheck -vguma
then
/scripts/fixquotas
The file that actually handles WHM > DNS Functions > Nameserver IPs area is at /var/cpanel/nameserverips.yaml location. If you want this to be changed, you’d want to make a backup of that file, then modify it:
Code:
cd /var/cpanel
cp nameserverips.yaml nameserverips.yaml.bak110711
vi nameserverips.yaml
It’s not directly possible from WHM inteface. But you can manaully edit then cpanel config files and assign dedicated IP for the addon domain and then install the SSL
Edit the file
Code:
/var/cpanel/userdata/username/addon-domain.com
and change the IP to a dedicated IP. Also edit the DNS entires for the addon domain and set the New IP there.
Now rebuild the apache configuration files
Code:
/scripts/rebuildhttpdconf
sudo su – root
Edit the following file:
/var/cpanel/userdata/USER/DOMAIN
Important! If you have an SSL certificate on the account, you may need to edit the following file as well.
/var/cpanel/userdata/USER/DOMAIN_SSL
You should see the file like the following. The areas to edit are in RED.
–
customlog:
–
format: combined
target: /usr/local/apache/domlogs/domain.com
–
format: “\”%{%s}t %I .\\n%{%s}t %O .\””
target: /usr/local/apache/domlogs/domain.com-bytes_log
documentroot: /home/USER/public_html
group: USER
hascgi: 1
homedir: /home/USER
ip: 0.0.0.0
owner: root
phpopenbasedirprotect: 1
port: 80
scriptalias:
–
path: /home/USER/public_html/cgi-bin
url: /cgi-bin/
serveradmin: [email protected]
serveralias: www.domain.com
servername: domain.com
usecanonicalname: ‘Off’
user: USER
Change the following lines in the file:
documentroot: /home/USER/public_html
path: /home/USER/public_html/cgi-bin
The changes will look like the following:
documentroot: /home/USER/public_html/new_doc_root_dir
path: /home/USER/public_html/new_doc_root_dir/cgi-bin
When finished editing the document root, run the following scripts while logged in as the ROOT user.:
/scripts/rebuildhttpdconf
service httpd graceful
Starting Dovecot Imap: doveconf: Fatal: Error in configuration file /etc/dovecot/sni.conf line 59: ssl_cert: Can’t open file /var/cpanel/ssl/installed/certs/01_webinf_ro_c1633_68425_1463431906_17b38c7a1f52478c8da1879eb6e668d2.crt: No such file or directory
################################################################################################################
Fix:
/scripts/build_mail_sni –rebuild_map_file –rebuild_dovecot_sni_conf