Skip to main content

Several / multiple virtualhosts for one cPanel user

Comments

4 comments

  • JacobPerkins
    Hi, Why is there a need for individual virtual hosts? Why does addon domains not work? Unfortunately, in this situation, hard coding this would probably be the only solution, other than splitting the domains up between individual users.
    0
  • actived
    Firstly, thanks for the quick reply.
    Why is there a need for individual virtual hosts? Why does addon domains not work?

    Well:
    the LAMP application handling all these domains is a single one and in the PHP code we check the domain and serve content accordingly.

    Now, if there is a solution in cPanel by which we can point all the add-on domain directories to a single directory, then I'm all ears.
    Unfortunately, in this situation, hard coding this would probably be the only solution, other than splitting the domains up between individual users.

    In which case, this would go to one of the pre/post template conf files, right? Regards, actived
    0
  • JacobPerkins
    Good morning, Thanks for the quick update. That makes sense, and it's not the first time I've heard of an application handling the domain routing. A wildcard domain might work well for you. That'll send *.domain.com to a specific directory, and the script / rewrite rules can do the rest. You an also point all addon domains to the same folder, this shouldn't be an issue. When you create the addon domain, point it to your specific folder instead of the default public_html/$domain folder. I hope this helps!
    0
  • actived
    You an also point all addon domains to the same folder, this shouldn't be an issue. When you create the addon domain, point it to your specific folder instead of the default public_html/$domain folder.

    Hmm. This is a good tip. I will try this soon and post an update if it works. Thanks again for the fast reply. Regards, actived
    0

Please sign in to leave a comment.