Typo3 v10 MultiSite on ISPConfig3 question

Discussion in 'Installation/Configuration' started by filius, Aug 7, 2020.

  1. filius

    filius New Member

    Hello everyone,
    I installed ISPConfig 3.1 following the excellent manual on Howtoforge:
    "The Perfect Server - Debian 10 (Buster) with Apache, BIND, Dovecot, PureFTPD and ISPConfig 3.1"

    on a VPS at providerX using a preinstalled Buster minimal, Apache 2.4.38 (Debian), MariaDB 10.3.22-0+deb10u1.
    In ISP Config 3.1, I added a new client1, and this client got two Sites, example1.com (web1) and example2.com (web2).
    Both example1.com and example2.com will be handled by the same client1 (me).

    The two Sites have the following site configuration(please exchange # with number 1 or 2, // is a comment):
    IPv4-Address: *
    Domain: example#.com
    Document Root: /var/www/clients/client1/web#
    Harddisk Quota: -1
    Traffic Quota: -1
    CGI: No
    SSI: No
    Perl: No
    Ruby: No
    Python: No
    SuEXEC: Yes
    Own Error-Documents: No
    Auto-Subdomain: None
    SSL: Yes
    Let's Encrypt: Yes
    PHP: PHP-FPM
    PHP Version: Default //default version is PHP 7.3.19-1~deb10u1 (cli) (built: Jul 5 2020 06:46:45)
    Web server config: -
    Active: Yes

    and under the OPTIONS I have the following relevant settings:
    Logfiles retention time: 10 //days
    Apache AllowOverride: All
    Enable PROXY Protocol: No
    Use Socket for PHP-FPM: Yes
    Chroot PHP-FPM: No
    PHP-FPM Process Manager: ondemand (PHP Version >=5.3.9)
    PHP-FPM pm.max_children: 10
    PHP-FPM pm.process_idle_timeout: 10 s
    PHP-FPM pm.max_requests: 0
    PHP open_basedir: /var/www/clients/client1/web2/web:/var/www/clients/client1/web2/private:/var/www/clients/client1/web2/tmp:/var/www/example#.com/web:/srv/www/example#.com/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom
    Custom php.ini settings: //is empty
    Apache Directives: // is empty

    The DNS Zones have the following relevant info in them for both domains:

    Zone (SOA): example#.com.
    A mail 1.2.3.4 0 3600
    A example#.com. 1.2.3.4 0 3600
    A www 1.2.3.4 0 3600
    CAA example#.com. 0 issue "letsencrypt.org" 0 3600
    MX //empty\\ mail 10 3600
    MX example#.com. mail.example#.com. 10 3600
    NS example#.com. v1234567890.providerX.com. 0 3600
    NS example#.com. secondary.providerY.com. 0 3600
    TXT default._domai... // DKIM key for example#.com\\ 0 3600
    TXT example#.com. v=spf1 mx a ~all 0 3600

    The two sites under web1/web/ and web2/web/worked OK with simple index.html files in them, I had to rename them later since html is rendered first before php by apache...

    I then installed the typo3 source the "classic way" (without Docker) in /var/www/
    and put the symlinks in /var/www/clients/client1/web1/web/ where they pointed to the typo3 source in /var/www/typo3_src-10.4.6
    Everything in and below /var/www/clients/client1/web1/ belongs to web1:client1

    Now this setup it works fine if you only have one site per one typo3 installation. If one want to reuse the source for another typo3 installation, one could also share the source adding :/var/www/clients/client1/web1/typo3_src-10.4.6 to the end of the PHP open_basedir paths (thanks to Hans for this hint in another of the threads here),

    However the goal is to use the same single typo3 installation in a "multiSite fashion" with shared folders ( fileadmin,typo3conf and typo3temp) under /var/www/clients/client1/web1/web/ for both example1.com and example2.com .
    This multisite configuration should then be managed from within the Backend of typo3 I believe starting version 9, with a "simple" entry in the site configuration page.
    See here(exchange first slash with a dot and take the spaces out - it seems I am not allowed to post links yet):
    stackoverflow/c o m/questions/52480063/how-to-setup-multiple-websites-on-single-typo3-v9-installation

    Unfortunately, this currently does not work out for example2.com, I got permission errors.

    So my question is: Should I set the link in /var/www/example2.com/ to /var/www/clients/client1/web1/web/ and change the owner of this link to web1:client1 ? I dont want to break the security of the Webserver in any way, nor disable the open_basedir. How can I make it work?
    I greatly would appreciate your input.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Delete the website example2.com and add example2.com as aliasdomain for website example1.com instead.
     
    filius likes this.
  3. filius

    filius New Member

    Thank you so much Till, this did the trick. Sometimes it is difficult to see the forest because of the heaps of trees. :rolleyes: Have a good weekend , stay safe!
     

Share This Page