Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

designate a primary domain for an IP address

Discussion in 'General Discussion' started by jenie_penny, Mar 21, 2018.

  1. jenie_penny

    jenie_penny Registered

    Joined:
    Nov 6, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    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
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. jenie_penny

    jenie_penny Registered

    Joined:
    Nov 6, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    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?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    This should resemble the actual path where the website files are stored. EX:

    Code:
    DocumentRoot /home/clientusername/public_html
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. jenie_penny

    jenie_penny Registered

    Joined:
    Nov 6, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    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
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,794
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice