I have a Wordpress installtion on an apache server /var/www/html/.
Within this folder (WP root), I've created a subfolder beta and in this folder have a Laravel 8 installation.
Separately (on a root domain/subdomain), the Laravel installtion works fine, but in my case it doesn't.
The first issue was with the public folder of laravel which looked like mywebsite.com/beta/public. I've fixed this by creating an .htaccess file within the Laravel root folder (/var/www/html/beta/.htaccess):
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
After this move, I can acess the Laravel app without public: mywebsite.com/beta.
Now, I have a problem with the assets because all of them were set relative to home directory (/). Ex. <img src="/images/img.jpg"> + css mix files:
<link rel="stylesheet" href="{{ mix('css/app.css') }}">
I've also updated the APP_URL=https://mywebsite.com/beta within the .env file, but this still doesn't work. Actualy by doesn't work I mean that the website is loaded correctly, but unstyled, which makes sense since in the console all the paths are trying to access the '/css/app.css', '/js/app.js' , 'fonts/font.ttf' , etc.