- Make sure there are empty as the destination IP is the use of subdomain
- Go to the SSH server console
- Type cd /var/cpanel/userdata
- Then to the destination username cpanelnya account, for example here is the user should examp, type cd examp
- In the examp user directory, there are files, and for example you want to change the subdomain Sub1, from the example.com domain that already exists, for example sub1.example.com
- Open the file sub1.example.com, use your favorite text editor such as (vi, vim, pico, nano, etc.)
customlog:
-
format: combined
target: /usr/local/apache/domlogs/example.com
-
format: “\”%{%s}t %I .\\n%{%s}t %O .\”"
target: /usr/local/apache/domlogs/example.com-bytes_log
documentroot: /home/examp/public_html
group: Group1
hascgi: 1
homedir: /home/examp
ip: 192.168.0.2 <— CHANGE THIS IP
owner: Example
phpopenbasedirprotect: 1
port: 80
scriptalias:
-
path: /home/examp/public_html/cgi-bin
url: /cgi-bin/
-
path: /home/examp/public_html/cgi-bin/
url: /cgi-bin/
serveradmin: webmaster@example.com
serveralias: www.example.com
servername: example.com
usecanonicalname: ‘Off’
user: examp
userdirprotect: ”
- Edit IP 192.168.0.2 in the example above with the IP Server that will be used.
- Save the file
- Do a rebuild Apache, type: /usr/local/cpanel/scripts/rebuildhttpdconf
- Do restart Apache, type: /usr/local/cpanel/scripts/restartsrv_apache
Done, you can try doing Installing SSL Certificates via WHM and will appear sub1.example.com with IP that was set above.