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.

AutoSSL & different DocumentRoot

Discussion in 'Security' started by iBotPeaches, Jun 21, 2017.

  1. iBotPeaches

    iBotPeaches Registered

    Joined:
    Jan 11, 2011
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    51
    Whether by mistake or not. I chose the best route for hosting a variety of applications, by simply dropping include files into `etc/apache2/conf.d/userdata` changing the DocumentRoot for most of my sites.

    When AutoSSL runs, it drops these challenge files into the regular `/home/$user/public_html`. I think I can probably work around this using mod_alias and some additional rules, but before I make things more complicated I'm wondering if there is another option here that would allow AutoSSL to work while maintaining different DocumentRoots.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,064
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    The proper method to modify the document root is to update the "documentroot" value in the file corresponding to the domain name in the following directory:

    /var/cpanel/userdata/$username/


    Then, run the following command:

    Code:
    /scripts/rebuildhttpdconf
    This should allow AutoSSL to detect the correct document root during the validation process.

    Thank you.
     
    iBotPeaches likes this.
Loading...

Share This Page