Redirect Error /public/

Discussion in 'General' started by rodrigosarri, Aug 20, 2019.

  1. rodrigosarri

    rodrigosarri Member

    I have two projects in Laravel framework:

    When enabled redirection on one of them to /public/ the other stops working returning the error:


    You do not have permission to access / on this server.

    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
    Apache / 2.4.10 (Debian) Server at Port 443

    In various internet searches, he tried every possible method of .htaccess and folder permission without result.


    One website is taking files from another:

    /var/www/clients/client16/web35/web/ it's from

    /var/www/clients/client12/web28/web/ it's from

    Warning: file_exists(): open_basedir restriction in effect. File(/var/www/clients/client12/web28/web/bootstrap/cache/compiled.php) is not within the allowed path(s): (/var/www/clients/client16/web35/web:/var/www/clients/client16/web35/private:/var/www/clients/client16/web35/tmp:/var/www/ in /var/www/clients/client16/web35/web/bootstrap/autoload.php on line 32

    Warning: realpath(): open_basedir restriction in effect. File(/var/www/clients/client12/web28/web) is not within the allowed path(s): (/var/www/clients/client16/web35/web:/var/www/clients/client16/web35/private:/var/www/clients/client16/web35/tmp:/var/www/ in /var/www/clients/client16/web35/web/bootstrap/app.php on line 15

    Warning: include(): open_basedir restriction in effect. File(/var/www/clients/client12/web28/web/vendor/vlucas/phpdotenv/src/Exception/InvalidPathException.php) is not within the allowed path(s): (/var/www/clients/client16/web35/web:/var/www/clients/client16/web35/private:/var/www/clients/client16/web35/tmp:/var/www/ in /var/www/clients/client12/web28/web/vendor/composer/ClassLoader.php on line 444

    Warning: include(/var/www/clients/client12/web28/web/vendor/vlucas/phpdotenv/src/Exception/InvalidPathException.php): failed to open stream: Operation not permitted in /var/www/clients/client12/web28/web/vendor/composer/ClassLoader.php on line 444

    Warning: include(): Failed opening '/var/www/clients/client12/web28/web/vendor/composer/../vlucas/phpdotenv/src/Exception/InvalidPathException.php' for inclusion (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/clients/client12/web28/web/vendor/composer/ClassLoader.php on line 444

    Fatal error: Class 'Dotenv\Exception\InvalidPathException' not found in /var/www/clients/client12/web28/web/vendor/vlucas/phpdotenv/src/Loader.php on line 75
    Last edited: Aug 20, 2019
  2. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Those are two different clients. It is on purpose that one client can not read files from other clients websites.
    I would not mess the file permissions to allow this access. Instead, create a client, create both websites under that client. This should work, perhaps with subdomains or such, but I have never done this kind of thing so can not give detailed advice.
    rodrigosarri likes this.

Share This Page