留言板

URLs with same domain mapped to portal instance

thumbnail
Gordon Augat,修改在9 年前。

URLs with same domain mapped to portal instance

Regular Member 帖子: 107 加入日期: 06-8-16 最近的帖子
Is it possible to map URLs with the same domain to a portal instance? For example...

www.liferay.com/portal1 maps to portal instance 1
www.liferay.com/portal2 maps to portal instance 2

If not, is this easily done with a hook or in the extension environment?
thumbnail
Olaf Kock,修改在9 年前。

RE: URLs with same domain mapped to portal instance

Liferay Legend 帖子: 6403 加入日期: 08-9-23 最近的帖子
Out-of-the-box portal instances are tied to their own domain name / virtual host.

Is it possible? Well, maybe. Easily done? Not so much. Why? Instances, by design, share nothing but the application server they all run on: The User database is completely different. Just having the cookies for user management (e.g. REMEMBER_ME cookies, session identifiers) is likely to mix between the different instances sooner or later if you share the same domain. Thus I'd assume it's not an easy task to do it right. At best it might be easy initial effort, but I predict endless troubleshooting.

Another domain is in the order of magnitude of 10 €/$ per year, the effort to change Liferay will be more. And if you encounter weird behaviour, nobody will be able to identify if you experience it because of an actual Liferay issue or because of your own changes to the authentication/instance handling.

And it might be even closer to your original request to tweak the subdomain to portal1.example.com and portal2.example.com