changing DocumentRoot

Discussion in 'ISPConfig 3 Priority Support' started by hotmifi, Feb 23, 2026.

Tags:
  1. hotmifi

    hotmifi New Member HowtoForge Supporter

    Was die stabilste Methode bei einer Site die DocumentRoot fest auf ein Unterverzeichnis zu legen?
    MfG
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    You always do this through the ISPConfig GUI, never change vhost files manually. Do you use Apache or Nginx server?
     
  3. hotmifi

    hotmifi New Member HowtoForge Supporter

    I have it in the Options like this right now, but it gives me another problem:

    DocumentRoot /var/www/clients/client0/web1/web/public/
    Alias /client/ /var/www/clients/client0/web1/web/client/
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Correct is this:

    Code:
    DocumentRoot /var/www/clients/client0/web1/web/public/
    Do not use an Alias.
     
  5. hotmifi

    hotmifi New Member HowtoForge Supporter

    but the application has installed a clients directory parallel to public and the web server needs to access it (I did not write the app). The installation guide uses an Alias. How else?
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, if the app needs that and the developer recommends it like this, then use Alias. Most apps would probably use a symlink in the filesystem for that.

    You said you have a problem with that setup. What is your exact problem? The website root is defined correctly like that.
     
  7. hotmifi

    hotmifi New Member HowtoForge Supporter

    In addtition I had to specify:

    <Directory /var/www/clients/client0/web1/web/>
    AllowOverride None
    </Directory>

    <Directory /var/www/clients/client0/web1/web/public/>
    AllowOverride All
    </Directory>

    After that the installation tries to access this existing directory:

    /var/www/opse.wbiat.de/web/public/api/v1 with this content:

    ls -al /var/www/opse.wbiat.de/web/public/api/v1/
    total 20
    drwxr-xr-x 3 web1 client0 4096 Feb 23 20:04 .
    drwxr-xr-x 3 web1 client0 4096 Feb 19 08:57 ..
    -rw-r--r-- 1 web1 client0 432 Feb 23 19:43 .htaccess
    -rw-r--r-- 1 web1 client0 1558 Feb 5 10:27 index.php
    drwxr-xr-x 2 web1 client0 4096 Feb 19 08:57 portal-access

    and fails with 500, but the error log does not show 500. It shows this:

    Feb 23 20:19:02 opse systemd[1]: apache2.service: Killing process 2223310 (apache2) with signal SIGKILL. Feb 23 20:19:02 opse systemd[1]: apache2.service: Killing process 2223313 (vlogger (access) with signal SIGKILL. Feb 23 20:19:02 opse systemd[1]: apache2.service: Killing process 2223314 (apache2) with signal SIGKILL. Feb 23 20:19:02 opse systemd[1]: apache2.service: Killing process 2223315 (apache2) with signal SIGKILL. Feb 23 20:19:02 opse systemd[1]: apache2.service: Killing process 2223317 (PassengerAgent) with signal SIGKILL. Feb 23 20:19:02 opse systemd[1]: apache2.service: Killing process 2223322 (PassengerAgent) with signal SIGKILL. Feb 23 20:19:02 opse systemd[1]: apache2.service: Killing process 2223338 (apache2) with signal SIGKILL. Feb 23 20:19:02 opse systemd[1]: apache2.service: Killing process 2223487 (php-cgi) with signal SIGKILL. Feb 23 20:19:02 opse systemd[1]: apache2.service: Killing process 2223488 (php-cgi) with signal SIGKILL. Feb 23 20:19:02 opse systemd[1]: apache2.service: Killing process 2224386 (php-cgi) with signal SIGKILL. Feb 23 20:19:02 opse systemd[1]: apache2.service: Killing process 2224387 (php-cgi) with signal SIGKILL.

    After that thei installation recommends a change like this:


    <Directory /var/www/clients/client0/web1/web/>
    AllowOverride All
    </Directory>

    But now the whole website ist FORBIDDEN.
     
    Last edited: Feb 24, 2026
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    It seems as if you look at the wrong log. The error.log of the website is in the log folder of the website. What you posted seem to be the syslog of the server and not a website error.log file.
     
  9. hotmifi

    hotmifi New Member HowtoForge Supporter

    My bad. This is the corresponding line in the log:

    2a02:2454:c045:f00:98e0:eaff:fe1c:1acc - - [24/Feb/2026:09:28:00 +0100] "GET /api/v1/ HTTP/2.0" 500 17 "https://opse.wbiat.de/install/" "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36"

    It happens when the installation trtes to access:

    /var/www/opse.wbiat.de/web/public/api/v1

    This I veryfied by using the network tap with the Browser DevTools.
     
    Last edited: Feb 24, 2026
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Disable custom error pages in the website, maybe you see a more detailed error then. Might be that your app requires an additional PHP module, or its not compatible with the used PHP version, or something similar.
     
  11. hotmifi

    hotmifi New Member HowtoForge Supporter

    The PHP version is 8.4 according to ISPconfig, but this seems strange to me:


    root@opse:~# phpenmod imap mbstring
    WARNING: Module imap ini file doesn't exist under /etc/php/8.5/mods-available
    WARNING: Module imap ini file doesn't exist under /etc/php/8.5/mods-available
    WARNING: Module mbstring ini file doesn't exist under /etc/php/8.5/mods-available
    WARNING: Module mbstring ini file doesn't exist under /etc/php/8.5/mods-available

    Is there some version mix going on?
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Is this a Debian or Ubuntu system? In this case, you use apt to install or uninstall modules. Installed modules are always enabled, phpenmod is not used.

    If modules are present or not in the PHP version used by a certain website can e.g., be checked with phpinfo() command in this website. Create a file info.php which runs this command, call it in a browser and check the result.

    Imap and mbstring are installed by default in PHP 8.4, for PHP 8.5 these do not exist, so the output of a phpenmod without specifying any version on a multi-PHP version system must result in such warnings.

    No, you just used the wrong command, which is not suitable for a System that runs multiple PHP versions.
     
  13. hotmifi

    hotmifi New Member HowtoForge Supporter

    I see. Thanks.

    The installer works with PHP, clearly: But:

    https://opse.wbiat.de/info.php shows this:

    phpinfo()

    and
    apache2ctl -M | grep -i php
    AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.vhost:7
    shows nothing.
    How is this possible?
     
    Last edited: Feb 24, 2026
  14. hotmifi

    hotmifi New Member HowtoForge Supporter

    Figured the syntax is wrong. info.php has to look like this:
    <?php
    phpinfo();
    to get full PHP info.
    PHP looks good: https://opse.wbiat.de/info.php

    but more error info than "500" I cannot see in the logs.
     
    Last edited: Feb 24, 2026
  15. hotmifi

    hotmifi New Member HowtoForge Supporter

    SOLVED!
    The applications web directory /var/www/opse.wbiat.de -> /var/www/clients/client0/web1/ is a symlink and the Installer does not allow using the symlink target specification during installation. Symlink itself only.
     
    till likes this.

Share This Page