Multi site's using sub domains

How to configure and adapt Aimeos based shops as developer
Forum rules
Always add your Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
mohan
Posts: 3
Joined: 02 Sep 2024, 07:28

Multi site's using sub domains

Post by mohan » 04 Sep 2024, 09:56

Hi mate,
Iam new to aimeos. i don't know how to setup multi site routing using sub domain with following configurations:

Main Domain: aimeos.domain.com
Subdomain: aimeos1.domain.com
I created a site named 'aimeos1' and added the following configurations:

In config/shop.php:
'routes' => [
'admin' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'admin', 'middleware' => ['web']],
'jqadm' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'admin/jqadm', 'middleware' => ['web', 'auth']],
'graphql' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'admin/graphql', 'middleware' => ['web', 'auth']],
'jsonadm' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'admin/jsonadm', 'middleware' => ['web', 'auth']],
'jsonapi' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'jsonapi', 'middleware' => ['web', 'api']],
'account' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'profile', 'middleware' => ['web', 'auth']],
'default' => ['domain' => '{site}.yourdomain.com', 'prefix' => 'shop', 'middleware' => ['web']],
'update' => ['domain' => '{site}.yourdomain.com'],
],

In routes/web.php:
Route::group(['domain' => '{site}.yourdomain.com', 'middleware' => ['web']], function () {
Route::get('/', '\Aimeos\Shop\Controller\CatalogController@homeAction')
->name('aimeos_home')->where(['site' => '[a-z0-9\-]+']);
});

Is there anything else that needs to be done? because while loading aimeos1.domain.com its loading the default site?
Last edited by mohan on 05 Sep 2024, 04:10, edited 1 time in total.

User avatar
aimeos
Administrator
Posts: 8148
Joined: 01 Jan 1970, 00:00

Re: Multi site's using sub domains

Post by aimeos » 04 Sep 2024, 10:38

Most likely the content only the content is the same. Change anything in the CMS module for your "aimeos1" site to see if the content changes.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply