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.

Map Subdomains to Folders Owned/Run by Other Apache/PHP/Cpanel Users

Discussion in 'cPanel Developers' started by kristofferR, Oct 20, 2012.

  1. kristofferR

    kristofferR Member

    Oct 20, 2012
    Likes Received:
    Trophy Points:
    cPanel Access Level:
    Root Administrator
    I run a small service for Norwegian customers where they get automatically installed and configured Wordpress blogs on their own domains ready immediately after payment is finished. It's quite similar to and WPEngine, just aimed at Norwegian customers with Norwegian Wordpress, support, billing etc.

    The backend is WHM/CPanel (Apache, PHP, mySQL), with a script running immediately after payment that installs and configures Wordpress and sends the customer an email with their username and password.

    Newly registered domains takes some time to propagate though, so for a day or two my customers unfortunately have to use a temporary URL before I can switch them over to their own domains.

    Right now my system uses mod_userdir ("serverIP/~cpanelusername"). However, it's not an optimal solution. It looks unprofessional, is confusing, and is quite problematic for both my customers and me.

    I'd rather prefer the temporary URL for their blogs to be "", with "" being a domain I own and served from the same server as the customer sites.

    I can easily modify the script to create the subdomains on my ""-domain, but how can I seamlessly map the subdomains to folders owned/ran on/by different CPanel/Apache/PHP users?
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Oct 2, 2010
    Likes Received:
    Trophy Points:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Basically, you are going to have the username generated via the script, correct? Shouldn't the subdomain just map to the same location as the primary domain, so you are actually creating a parked domain that is a subdomain on the primary domain. As such, it should be mapping as a parked domain to /home/username/public_html location.

Share This Page