Modx Multidomain when domains are not aliases

Hello,

I will write in english, because I don't have russian keyboard, but feel free to reply in russian.

I have domains on one server with the same IP address, but in different directories (virtual domains?):

/same/same/domains/maindomain.com/public_html/ — modx install here
/same/same/domains/domain2.com/public_html/ — copies of .htaccess, index.php and config.core.php here
etc

I use one of contexts routing plugins and there are no problems when I make a virtual subfolder or make domain2.com as alias to maindomain.com — everything functions as expected. But the problem is, that I can't point domain2.com as alias to maidomain.com, since I need some domain2.com independence — create separate emails, have its own folders — and my hosting provider doesn't let to do this if the domain is set up as pointing/alias.

What I did so far is I put .htaccess, index.php and config.core.php to domain2.com/public_html/. The site loads under domain2.com. Friendly urls seems to function, pages load, but what doesn't function are paths — since paths are based on base_url, no /style/, /js/ or even /assets/ folders contents display because they are not physically on domain2.com/public_html/

Of course I could indicate in templates full web address for /styles/ or /js/ folders, but for /assets/ folder this doesn't work. Neither can I not set up paths for Media Sources to work in domain2.com

So my question is — how to set up modx multidomain install when domains are on the same server but are not aliases? Is this possible? What else needs to be changes besides putting .htaccess, index.php and config.core.php in domain2.com root?

Thank you.
Trying
05 марта 2016, 10:14
modx.pro
2 014
0

Комментарии: 1

Василий Наумкин
05 марта 2016, 15:37
0
Try to use this article — bezumkin.ru/sections/tips_and_tricks/2439/.

No subfolders, no web-server settings, just one MODX plugin and some context settings.
    Авторизуйтесь или зарегистрируйтесь, чтобы оставлять комментарии.
    1