Category: cPanel

Cpanel fixquota

/scripts/fixquotas

will say something like;

edquota: Quota write failed (id 526): Invalid argument

so to fix it;

/sbin/quotacheck -vguma

then

/scripts/fixquotas

Click to rate this post!
[Total: 0 Average: 0]

Cpanel DNS IP change

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

Click to rate this post!
[Total: 0 Average: 0]

Cpanel how to change ip address for addon domain

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

Click to rate this post!
[Total: 0 Average: 0]

How to change documentroot in cPanel for primary domain

ssh [email protected]

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

Click to rate this post!
[Total: 0 Average: 0]

Dovecot starting error

 

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

Click to rate this post!
[Total: 1 Average: 1]