Results 1 to 3 of 3

Thread: Edit document root of an addon domain

  1. #1
    Registered Member
    Join Date
    Jul 2003
    Posts
    11

    Default Edit document root of an addon domain

    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. #2
    Registered Member LiNUxG0d's Avatar
    Join Date
    Jun 2003
    Location
    Gatineau, Quebec, Canada
    Posts
    206

    Default

    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,
    http://www.okteck.com/
    The best web hosting, reseller hosting and dedicated server packages!

  3. #3
    Registered User
    Join Date
    May 2008
    Posts
    1

    Default

    Quote Originally Posted by amusive View Post
    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
    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

Similar Threads

  1. Addon domain document root at HOME/addondomain
    By pthirose in forum General Discussion
    Replies: 0
    Last Post: 05-04-2012, 06:44 PM
  2. Document Root - Edit in bulk?
    By forumfish in forum cPanel Developers
    Replies: 7
    Last Post: 02-14-2012, 10:28 PM
  3. Where domain document root settings are?
    By excessnet in forum General Discussion
    Replies: 0
    Last Post: 02-11-2008, 01:36 PM
  4. Mapping a New Domain to Another Document Root
    By webr00t in forum General Discussion
    Replies: 7
    Last Post: 02-06-2008, 02:13 PM
bargain