ErrorException require(/vendor/magento/framework/registration.php): failed to open stream: No such file or directory in magento 2.3.7

i have two Magento projects,

website1 with :
-Magento version 2.3.1
-php fpm7.1
-mysql 5.7
-apache2 2.4.41
-composer 1
-in the file /etc/apache2/sites-available/website1.app.local.fr.conf

<VirtualHost *:80>
    ServerName website1.app.local.fr
    ServerAlias bo.website1.app.local.fr
    DocumentRoot "/var/www/html/website1/web"

    # Sources
    <Directory "/var/www/html/ecom-web/web">
        Options Indexes FollowSymLinks MultiViews Includes
        AllowOverride all
        Order allow,deny
        Allow from all
        Require all granted
    </Directory>
    
    <FilesMatch .php$>
    SetHandler "proxy:unix:/run/php/php7.1-fpm.sock|fcgi://localhost"
    </FilesMatch>

    # Logs
        ErrorLog "/var/log/apache2/website1.error_log"
        CustomLog "/var/log/apache2/website1.access_log" common
</VirtualHost>

# SSL
<IfModule mod_ssl.c>
    <VirtualHost *:443>
        ServerName website1-web.app.local.fr
        ServerAlias bo.website1-web.app.local.fr
        DocumentRoot "/var/www/html/website1/web"

    # SSL
    SSLEngine on
    SSLCertificateFile "/var/www/html/website1/ssl/website1.app.local.fr.crt"
    SSLCertificateKeyFile "/var/www/html/website1/ssl/website1.app.local.fr.key"

        # Sources
        <Directory "/var/www/html/website1/web">
            Options Indexes FollowSymLinks MultiViews Includes
            AllowOverride all
            Order allow,deny
            Allow from all
            Require all granted
        </Directory>
        
        <FilesMatch .php$>
    SetHandler "proxy:unix:/run/php/php7.1-fpm.sock|fcgi://localhost"
    </FilesMatch>

        # Logs
        ErrorLog "/var/log/apache2/website1.error_log"
        CustomLog "/var/log/apache2/website1.access_log" common
    </VirtualHost>
</IfModule>

and wibsite2 with :
-Magento version 2.3.7
-php fpm7.4
-mysql 5.7
-apache2 2.4.41
-composer 2
-in the file /etc/apache2/sites-available/website2.app.local.fr.conf

<VirtualHost *:80>
    ServerName website2.app.local.fr
    ServerAlias bo.website2.app.local.fr
    DocumentRoot "/var/www/html/website2/web"

    # Alias
    Alias "/media" "/var/www/html/website2/web/pub/media"

    # Sources
    <Directory "/var/www/html/website2/web">
        Options Indexes FollowSymLinks MultiViews Includes
        AllowOverride all
        Order allow,deny
        Allow from all
        Require all granted
    </Directory>
    
    <FilesMatch .php$>
      SetHandler "proxy:unix:/run/php/php7.4-fpm.sock|fcgi://localhost"
    </FilesMatch>

    # Logs
        ErrorLog "/var/log/apache2/website2.error_log"
        CustomLog "/var/log/apache2/website2.access_log" common
</VirtualHost>

# SSL
<IfModule mod_ssl.c>
    <VirtualHost *:443>
        ServerName website2.app.local.fr
        ServerAlias bo.website2.app.local.fr
        DocumentRoot "/var/www/html/website2/web"

        # SSL
        SSLEngine on
        SSLCertificateFile "/var/www/html/website2/ssl/website2.app.local.fr.crt"
        SSLCertificateKeyFile "/var/www/html/website2/ssl/website2.app.local.fr.key"

        # Alias
        Alias "/media" "/var/www/html/website2/web/pub/media"

        # Sources
        <Directory "/var/www/html/website2/web">
            Options Indexes FollowSymLinks MultiViews Includes
            AllowOverride all
            Order allow,deny
            Allow from all
            Require all granted
        </Directory>
        
        <FilesMatch .php$>
       SetHandler "proxy:unix:/run/php/php7.4-fpm.sock|fcgi://localhost"
    </FilesMatch>

        # Logs
        ErrorLog "/var/log/apache2/website2.error_log"
        CustomLog "/var/log/apache2/website2.access_log" common
    </VirtualHost>
</IfModule>

i have following this tuto https://www.digitalocean.com/community/tutorials/how-to-run-multiple-php-versions-on-one-server-using-apache-and-php-fpm-on-ubuntu-18-04-fr#etape-4-test-des-deux-sites-web

the problem now is that i can run website1 perfectly with no problem with setup:upgrade,composer install… and i can access to the website by the browser, but the website2 can’t be accessible by browser, and it tells me the error below when I run composer install

 [ErrorException]                                                                                                                   
  require(vendor/magento/framework/registration.php): failed to open stream: No such file or directory  

any help please?