Posts for: #cPanel

Limit email/hour for just one domain on an account (addon, park, or sub domain).

Sometimes you have an email account and you want to edit the email/hour for only one of the domain on the account, here is how to do that. SSH to the server ssh domainHere.com Edit the file /var/cpanel/users/userAccount file Add or Edit a line like this MAX_EMAIL_PER_HOUR-domainHere.com=100 Replace domainHere.com with the domain name in question, and 100 with the number of emails per hour you wish to allow. Save the file and run /usr/local/cpanel/scripts/updateuserdomains
MORE →

Create cPanel WHM session from CLI

Sometimes you don’t know or want to change the root password to be able to log into WHM as root (yes I know you shouldn’t log in as root, but sometimes you do). Here’s the command to do that via CLI whmapi1 create_user_session user=root service=whostmgrd locale=en This will return something like to following data: cp_security_token: /cpsess9427258339 expires: '1596644759' locale: en service: whostmgrd session: root:J7omtbeEeUhJ9yPK:create_user_session,yAs86MVYrHT46avjRLAGxhHaEFrFV3Hf url: https://server.domain.com:2087/cpsess9427258339/login/?locale=en&session;=root%2UtnqjEJVUBNo2JnKH%3acreate_user_session%55nNCwxRW4tzqEe6NUYKwWrDM7N485TiYA metadata: command: create_user_session reason: Created session result: 1 version: 1 You will use the URL and it will take you right into WHM
MORE →

Multi-Domain SSL Setup with “Subject Alternative Names”

Here’s how to create a cert/csr with more than one domain name. First you’ll want to create the directory. I use NGiNX so I like to put my certs in /etc/nginx/ssl, but you can put yours anywhere So now we will create the directory mkdir /etc/nginx/ssl/domainName Now we will cd into the directory cd /etc/nginx/ssl/domainName Now we will paste the following in the sslConfig.txt file. [req] default_bits = 4096 prompt = no default_md = sha256 req_extensions = req_ext distinguished_name = dn [ dn ] C=US ST=YOURstateHERE L=YOURcityHERE O=YOURorgNAMEhere CN = YOURmainDOMAINhere [ req_ext ] subjectAltName = @alt_names [ alt_names ] DNS.
MORE →

Change username for cPanel user

Unfortunately it doesn’t appear cPanel allows you to easily change the username. Most documentation I’ve read says to use the “Rearrange an Account” option, but if you only have one disk that doesn’t seem to get you an option. The downside to this is that is doesn’t fully do a normal restore it will restore the new account to the new directory, but it will symlink the old username to the new directory.
MORE →

Comments: