designate a primary domain for an IP address

jenie_penny

Registered
Nov 6, 2007
3
0
51
Hi There,
I have a client who I setup 1 main domain and 3 sub domains. The account is on a dedicated IP address. The client needs to be able to access the site via the IP address (a big requirement for the client for some reason). When they go to the IP address directly one of the subdomains loads instead of the main site. Where can I change that setting so the IPs primary site (that loads under the IP if no /~username/ is used) shows up instead of one of the subdomains?
thanks!
Jen
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,910
2,233
363
cPanel Access Level
DataCenter Provider
Twitter

jenie_penny

Registered
Nov 6, 2007
3
0
51
Thank you for the reply, please forgive my newbie questions. So am I understanding it correctly that I follow the directions to add:


<VirtualHost THEDEDICATEDIPADDRESS:80>
ServerName MYSHAREDSERVERHOSTNAME
DocumentRoot /THECLIENTUSERNAME/local/apache/htdocs
ServerAdmin EMAIL
<IfModule mod_suphp.c>
suPHP_UserGroup nobody nobody
</IfModule>
</VirtualHost>

adding the THECLIENTUSERNAME in the path to ensure the correct site is shown? When done that will ensure THEDEDICATEDIPADDRESS shows the client's main domain?
 

jenie_penny

Registered
Nov 6, 2007
3
0
51
thank you! I got it working for the non-ssl. Any idea where I can find the path in WHM/CPanel for the

SSLCertificateFile SSLCERTIFICATEFILE
SSLCertificateKeyFile YOUR-SSLCERTIFICATEKEYFILE
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,910
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Hello,

You'd simply have it match the value that's utilized in the virtual host of the domain name associated with the certificate you want to use. EX:

Code:
SSLCertificateFile /var/cpanel/ssl/apache_tls/example-domain.tld/combined
You should be able to exclude the "SSLCertificateKeyFile" value from the entry.

Thank you.