The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Staging WebSite Without Subdomain

Discussion in 'General Discussion' started by Benjamin Roberts, Nov 22, 2016.

  1. Benjamin Roberts

    Benjamin Roberts Registered

    Joined:
    Jun 3, 2016
    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Kilgore, Texas, USA
    cPanel Access Level:
    Root Administrator
    In order to accommodate significant Web site updates affecting all aspects of the sites (e.g. content, code, databases, hosting configuration, etc) with as little interruption in availability as possible and the least post-launch adjustment possible, I would like to stage new (but not yet active) production Web sites on same cPanel server where the existing (legacy) Web sites are located and associated with the same domain, but without using add-on or sub-domains.

    That is, I would like to create multiple cPanel accounts associated with the same domain names, at least on the WHM cPanel server, but different public IP addresses and use DNS to control which are the "active" accounts or Web site instances of each based on how the names are resolved via internet DNS.

    Is it possible (and supported) to have two cPanel accounts associated with the same domain name, but using different public IP addresses? For example:

    cPanel Account #1
    Domain: mydomain.com
    IP Address: 1.2.3.4

    cPanel Account #2
    Domain: mydomain.com
    IP Address: 5.6.7.8

    Local host files would be used for testing purposes before the public DNS changes were made. Of course, this would affect public cPanel Web portal access through directory aliases such as mydomain.com/cpanel and other DNS related aspects of the corresponding cPanel accounts, which is understandable and acceptable.
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    15,618
    Likes Received:
    296
    Trophy Points:
    433
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    It's not. The easiest way to setup a staging environment, in my opinion, is to create a directory for it on the same account.
    domain.com
    domain.com/stage/ (password protected to keep private)
     
  3. Benjamin Roberts

    Benjamin Roberts Registered

    Joined:
    Jun 3, 2016
    Messages:
    4
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Kilgore, Texas, USA
    cPanel Access Level:
    Root Administrator
    @Infopro: Thanks for the suggestion. Yes, using a sub-directory and/or sub-domain often results creating related dependencies for projects/packages such as WordPress and others. Many of these, for better or worse (worse in this case), store directory and/or domain references in their databases, sometimes even serialized with the data length as part of the serialized values, and thereby create a bit of a mess when it comes to "flipping" a staged site into the production site when that entails changing the associated directory location and/or primary domain name. Fun times.
     
Loading...

Share This Page