Multiple test sites on 1 url

Questions around the Aimeos bundle for the Symfony framework
Forum rules
Always add your Symfony, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
Doveman
Posts: 23
Joined: 06 Nov 2017, 20:59

Multiple test sites on 1 url

Post by Doveman » 20 Nov 2017, 18:33

Is it possible to set up multiple installations under one url?
For example:
The root url = domain.com/htdocs
Installation # 1 zlc1 and address it in the browser as domain.com/htdocs/zlc1/web/app_dev.php/list
Installation # 2 zlc2 and address it in the browser as domain.com/htdocs/zlc2/web/app_dev.php/list

I tried it with just one and it kind of works but I have no idea if there is a way to set the configurations so that the formatting and images don't disappear. Are there any other consequences to doing this?

Thanks

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

Re: Multiple test sites on 1 url

Post by aimeos » 20 Nov 2017, 22:48

You should only do this if you need different custom templates for each installation.
One problem we've seen with Laravel in such cases is that the uploaded images in the admin interface are not shown and you need to reconfigure the base URL of the images for each installation: https://aimeos.org/docs/Configuration/C ... nt/baseurl
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Doveman
Posts: 23
Joined: 06 Nov 2017, 20:59

Re: Multiple test sites on 1 url

Post by Doveman » 24 Nov 2017, 18:16

I would like to be able to do this as I have multiple projects going on that all have different requirements but are being developed on the same url. In the end I will be able to set the live installations up with the url pointing to "web".

This works fine for the admin. All the images are correct and the pages look good. Not so with the client view. All images are lost and the formatting is all gone. Looking at the generated html source it is quite apparent why. Here is a snippet.

<link rel="canonical" href="/zlcsymfony/web/app_dev.php/list" />
<meta name="application-name" content="Aimeos" />
<script type="text/javascript" defer="defer" src="/zlcsymfony/web/app_dev.php/stock?s_prodcode% .... "></script>
<link rel="icon" type="image/x-icon" href="/zlcsymfony/web/favicon.ico" />
<link href="https://maxcdn.bootstrapcdn.com/bootstr ... ap.min.css" rel="stylesheet">
<link type="text/css" rel="stylesheet" href="/bundles/aimeosshop/themes/elegance/common.css" />
<link type="text/css" rel="stylesheet" href="/bundles/aimeosshop/themes/elegance/aimeos.css" />

Notice that some of the links have the "/zlcsymfony/web" pre-pended to the link and others don't . I am guessing but I suspect there is no easy solution to this. Correct?
If not I guess I will have to create multiple domains which I was hoping to avoid.

Thanks

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

Re: Multiple test sites on 1 url

Post by aimeos » 24 Nov 2017, 21:08

Maybe there's an easy solution. The base.html.twig template contains absolute fixed URLs:
https://github.com/aimeos/aimeos-symfon ... .html.twig

Can you try to replace them by "{{ asset('.../aimeos.css') }}"? You have to see what the right path is.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Doveman
Posts: 23
Joined: 06 Nov 2017, 20:59

Re: Multiple test sites on 1 url

Post by Doveman » 25 Nov 2017, 20:05

That worked great! Thank you very much.

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

Re: Multiple test sites on 1 url

Post by aimeos » 25 Nov 2017, 20:12

Can you create a pull request to share your changes?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Doveman
Posts: 23
Joined: 06 Nov 2017, 20:59

Re: Multiple test sites on 1 url

Post by Doveman » 28 Nov 2017, 15:55

I would be happy to as soon as I figure out how to do that.

Post Reply