Wednesday, August 8, 2012

How to Assigning Dedicated IPs to Subdomains?

If you plan to perform Install SSL Certificates on a subdomain of the domain itself. With condition the subdomain must have its own dedicated IP. An example is the where subdomain installed dedicated IP and SSL Certificates, the following explanation how to assigning dedicated IPs to Subdomains with easy.
  • 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 domain that already exists, for example
  • Open the file, use your favorite text editor such as (vi, vim, pico, nano, etc.)
Edit the IP address as the following example:

format: combined
target: /usr/local/apache/domlogs/
format: “\”%{%s}t %I .\\n%{%s}t %O .\”"
target: /usr/local/apache/domlogs/
documentroot: /home/examp/public_html
group: Group1
hascgi: 1
homedir: /home/examp
owner: Example
phpopenbasedirprotect: 1
port: 80
path: /home/examp/public_html/cgi-bin
url: /cgi-bin/
path: /home/examp/public_html/cgi-bin/
url: /cgi-bin/
usecanonicalname: ‘Off’
user: examp
userdirprotect: ”
  • Edit IP 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 with IP that was set above.

1 comment: