Change document root for one Vhost

Discussion in 'General' started by punto, Mar 17, 2007.

  1. punto

    punto New Member

    Hello,
    I am trying to install a CMS(Website Baker) for a client and I need to change the document root from /var/www/web41/web to /var/www/web41/wb
    I need to change it for the install script to execute correctly.

    I edited the Vhosts_ispconfig.conf file and changed the path for this Vhost, ran the script but then when apache restarts, the path for the document root in Vhosts_ispconfig.conf is set back to /var/www/web41/web which then causes the script to crash.

    Also a new web directory is created under /var/www/web41 (with a new index page), even after I removed the original one and as such when I browse to www.web41.com I get the welcome page, that is presented when you first create a website. Everything is being reset back when apache restarts and all my changes lost!

    How can I make this one change for this one Vhost stay permanent?

    Regards

    Matt
     
  2. punto

    punto New Member

    I forgot to mention adding an entry into the apache directives doesnt help either as it just adds the entry to the Vhosts_ispconfig.conf file and doesnt overwrite it, so the original reference to the document root takes precedence.
     
  3. brengo

    brengo New Member

    How about a symlink?

    1st solution (recommended as it leaves the /web directory including its subdirectories & files intact):
    ln -s /var/www/web41/web /var/www/web41/wb
    run the installer for the cms afterwards - it should run fine :)

    2nd solution (the other way round - TAKE CARE, this will DELETE all your contents including Subdirectories and files of /var/www/web41/web !!!):
    rm -r /var/www/web41/web
    ln -s /var/www/web41/wb /var/www/web41/web
     
  4. punto

    punto New Member

    Brengo,

    Thank you for the suggestions, the second option worked a treat!

    Your help is much appreciated :)

    Kind Regards

    Matt
     

Share This Page