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.

Alter documentRoot public_html to public_html/public

Discussion in 'EasyApache' started by Thiago Moreira, Aug 22, 2016.

  1. Thiago Moreira

    Joined:
    Jun 21, 2016
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    Hello guys.

    I have a little problem, I changed the files:

    /var/cpanel/templates/apache2_4/vhost.local in line
    DocumentRoot = [% DocumentRoot%]/public

    By changing this part and make the following commands:
    /Usr/local/cpanel/bin/apache_conf_distiller -update
    /Usr/local/cpanel/bin/build_apache_conf
    service httpd restart

    The server time to time update the files normally:
    /var/cpanel/userdata/$username/$domain.com

    My problem is that from time to time he takes the documentoroot and concatenate with the public, making a folder loop:

    [% DocumentRoot%]/public/public/public .......

    How do I change whenever you create a new account the DocumentRoot it is always public_html to public_html/public?

    I use various PHP frameworks that need to be in those folders.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,709
    Likes Received:
    658
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you provide some more information on how you want the document root value configured?

    Also, could you verify if this happens after cPanel updates? You can test this by forcing an update of cPanel via:

    Code:
    /scripts/upcp --force
    Also, could you let us know if running "/scripts/rebuildhttpdconf" after the update fixes the problem?

    Thank you.
     
  3. Thiago Moreira

    Joined:
    Jun 21, 2016
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    Hello.

    Thanks for the answer.

    I need to always create a new account, the default Apache way to my client is public_hml/public and not only public_html

    I have clients who use several framework and it is necessary that within the public_html folder public is the default.

    Can you help me?
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,709
    Likes Received:
    658
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you verify if this happens after cPanel updates? You can test this by making the changes, and forcing an update of cPanel via:

    Code:
    /scripts/upcp --force
    Also, could you let us know if running "/scripts/rebuildhttpdconf" after the update fixes the problem?

    Thank you.
     
  5. Thiago Moreira

    Joined:
    Jun 21, 2016
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Brazil
    cPanel Access Level:
    Root Administrator
    Michael, okay?

    Did you understood my question?

    I need to change the default apache folder that is currently public_html to public_html / public

    Every new account created that that within the public_html folder to be the default public folder apache.

    Understood?
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,709
    Likes Received:
    658
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Would you mind opening a support ticket using the link in my signature so we can take a closer look and determine why your custom changes are not working as intended? You can post the ticket number here so we can update this thread with the outcome.

    Thank you.
     
Loading...
Similar Threads - Alter documentRoot public_html
  1. sparek-3
    Replies:
    2
    Views:
    272
  2. dolomats
    Replies:
    4
    Views:
    626

Share This Page