Page 1 of 1

Multiple test sites on 1 url

Posted: 20 Nov 2017, 18:33
by Doveman
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

Re: Multiple test sites on 1 url

Posted: 20 Nov 2017, 22:48
by aimeos
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

Re: Multiple test sites on 1 url

Posted: 24 Nov 2017, 18:16
by Doveman
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

Re: Multiple test sites on 1 url

Posted: 24 Nov 2017, 21:08
by aimeos
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.

Re: Multiple test sites on 1 url

Posted: 25 Nov 2017, 20:05
by Doveman
That worked great! Thank you very much.

Re: Multiple test sites on 1 url

Posted: 25 Nov 2017, 20:12
by aimeos
Can you create a pull request to share your changes?

Re: Multiple test sites on 1 url

Posted: 28 Nov 2017, 15:55
by Doveman
I would be happy to as soon as I figure out how to do that.