1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Edit document root of an addon domain

Discussion in 'General Discussion' started by amusive, Apr 10, 2008.

  1. amusive

    amusive New Member

    Joined:
    Jul 7, 2003
    Messages:
    11
    Likes Received:
    0
    Trophy Points:
    1
    Howdy,

    I need to edit the document root of an add-on domain. I can't seem to find a way to do it, though.
    I know I could edit the httpd.conf, but there are some glaring warnings and rightfully so - any edits I make to the document root are reverted if I rebuild httpd conf files.

    Is there a db file or some central location the data are stored at I can edit (or some other way to edit the path so it is edited EVERYWHERE)?

    Thanks
    Jim
     
  2. LiNUxG0d

    LiNUxG0d Member

    Joined:
    Jun 25, 2003
    Messages:
    206
    Likes Received:
    1
    Trophy Points:
    18
    Location:
    Gatineau, Quebec, Canada
    Hey there,

    Since addon/sub-domains area really only httpd.conf entries that point to the files in a folder, why not just... delete the addon/sub-domain and re-add it with the appropriate folder?

    If you delete it from the cPanel, it will remove it from the httpd.conf and keep the folder (doesn't usually delete the folder) and then you re-add it and specify the new folder, which will re-create the VHost with the appropriate DocumentRoot in the httpd.conf.

    Let me know if this sounds harsh, I see no negative impacts to doing this.

    Regards,
     
  3. arillan

    arillan New Member

    Joined:
    May 26, 2008
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Hi,
    We do something like this:
    mkdir -p /usr/local/apache/conf/userdata/std/2/test/test.test.ru

    where std or ssl and "2" - Apache version.

    create file "custom.conf" and put your changes in it:

    DocumentRoot /home/test/public_html/new

    Then run:
    /scripts/ensure_vhost_includes --user=test
     

Share This Page