Each Laravel installation should be located in its own directory.
Then an alias needs to be defined which points the domain sub-folder to the "child" Laravel folder.
Example in Apache http.conf
:
<VirtualHost some.domain:80>
ServerName some.domain
## Path to laravel domain
DocumentRoot "/path/to/some/domain/laravel-1/public"
<Directory "/path/to/some/domain/laravel-1/public">
AllowOverride All
</Directory>
## Path to laravel sub-folder
Alias /laravel-2-path-alias/ "/path/to/some/domain/laravel-2/public"
<Directory "/path/to/some/domain/laravel-2/public">
AllowOverride All
</Directory>
</VirtualHost>
For session cookies, check configsession.php
in both installations.
Root installation configsession.php
:
'cookie' => 'a_unique_name'
'path' => '/',
Subfolder installation configsession.php
:
'cookie' => 'another_unique_name'
'path' => '/path/to/sub/folder',
This should ensure that each installation is writing its own unique session cookies. Any cookies generated by the sub application should not interfere with those of the parent.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…