I am trying to host a laravel inside a laravel application because I need it to work on the same domain.
So imagine my domain is somedomain.com. I am already pointing it to the public directory of a laravel project. Now I need to host another laravel project at the same domain (not subdomain).
How can I do this? For example
somedomain.com/foo/bar to point to the public directory of another laravel project using nginx or apache?
I tried the solution from
flakerimi, and it half works for now. I am not sure what I am doing wrong.
So I went to the apache conf for the laravel application sitting on mydomain.com and made the
Alias /email /dir/to/other/laravel/public change and sure now all the
But I see a 404 on all
/email/ routes, but not a laravel 404, a apache 404 page. Which means that apache is going to the other laravel application but it is not able to use the routes there correctly.
I tried placing
RewriteBase /email in the .htaccess file of the other laravel application but no luck. Any ideas anyone?
Just like you do in localhost
edit htaccess on laravel2
## Path to laravel domain DocumentRoot "/path/to/some/domain/laravel1/public" <Directory "/path/to/some/domain/laravel1/public"> AllowOverride All </Directory> ## Path to laravel sub-folder Alias /laravel2/ "/sites/laravel2/public" <Directory "/sites/laravel2/public"> AllowOverride All </Directory>
config/session.php for both installations
'cookie' => 'a_unique_name' 'path' => '/',
'cookie' => 'a_unique_name_L2' 'path' => '/laravel2',