Can't change DocumentRoot

Discussion in 'Installation/Configuration' started by Locutus, Aug 13, 2013.

  1. Locutus

    Locutus New Member

    Hello everybody,

    I'm using ISPConfig 3 on one of our test-servers to see if we can use it on our production system. Therefore I need an exact copy of our production server on the test-server.

    The platform/website that runs on production is placed in:

    I created a new web in ISPConfig and I wanted to change the DocumentRoot to /data/www-data/platform in the "Options"-tab of the web-settings.
    But when I open the URL now, I'm getting a 403 error.

    Then I tried to rename the /var/www/name.tdl/web folder to web.old, so that I could create a symlink to /data/www-data/platform, but that did not work either, because I was unable to rename the web-folder even though I'm root-user. :confused:

    Could you help me out with that issue?

    Thanks and regards
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Both things yu tried can not work on a ispconfig server.

    1) The path /data/www-data/platform is not compatible with ispconfig as it does not contain modifiers for client and website ID.
    2) The folders inside a web root in ispconfig are protected with filesystem attributes, so you cant change them without removing the immutable flag first. But replacing the web folder with a symlink is no good idea anyway as ispconfig will detect this manipulation and some functions will stop working.

    If you want to point the web dire to another location, better use a bind mount in /etc/fstab.
  3. Locutus

    Locutus New Member

    Is this the correct /etc/fstab entry for my purpose?

    /var/www/client0/web1/web /data/www-data/platform ext4 rw,bind 0 0
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    I would use this one:

    /data/www-data/platform /var/www/client0/web1/web none bind,nobootwait 0 0

    then save the file and run:

    mount -a

    to apply it.

Share This Page