Skip to main content

Apache config for sharing domain document root

Comments

5 comments

  • cPanelMichael
    Hello, The only supported method of sharing a document root between two domain names is to utilize the Addon domains feature (as opposed to two separate cPanel accounts): Addon Domains - Documentation - cPanel Documentation Thank you.
    0
  • Jarod Thornton
    So we ditched the first attempt to override vhost and decided to setup the following: [LIST]
  • domain1 has dedicated IP
  • domains use shared IP
  • domain2 is on it's own cpanel so client can use email etc
  • domain2 has an A record pointing to domain1 dedicated IP This works, however I am now unable to get autossl to work with this setup. None of the common names in the certificate match the name that was entered. How can I overcome this?
  • 0
  • cPanelMichael
    Hello, The issue is that it's going to load the certificate associated with the domain name on the other cPanel account, and thus not match the domain name entered in the browser. The only true way to support sharing a document root would be to have the domain names be part of the same cPanel account through the use of addon domain names. Thank you.
    0
  • Jarod Thornton
    I understand. So our goal is to provide our clients (if they wish) a dedicated cPanel environment for their hosting. We also offer a managed WordPress service which is on it's own dedicated cPanel account. Some clients may have multiple domains on their cPanel and want to use the managed WordPress service for one. That is what we are trying to setup. If they were on a separate host we could just create the A record to the IP for the managed WP service. Do you have a suggestion for a solid workaround to this so we can provide this kind of split service?
    0
  • cPanelMichael
    Hello, That type of configuration isn't supported because it would involve sharing a document root with domain names across multiple accounts. That said, there is an unsupported workaround for a similar setup on the following threads you may find helpful: Share Directory Across Multiple Accounts sharing directory for users /home/scripts Thank you.
    0

Please sign in to leave a comment.