Once you deployed liferay, how do you change the default home url? Standard is that it forwards to the guest community, but I would like to change that url to an organization’s public page home-url.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’ve done it by using the “Virtual Hosts” option provided through Liferay. On each community’s settings, you can define a “virtual host” value. If Liferay receives a request coming with a URL that matches a community’s virtual host, that community’s content will be served.
For example, my Liferay server may be hosted on “
my-liferay-server” – but has 3 communities – “guest”, “site1” with a virtual host configured of “site1.example.com“, and “site2” with a virtual host configured of “site2.example.com“. These additional DNS names all point to “my-liferay-server“. As Liferay receives each request, it looks at the requested host name, and forwards to the proper community.Note that Liferay only supports one “Virtual Host” value per community – so unfortunately, you can’t have both “
site1.example.com” and “site3.example.com” served by the same community by Liferay itself. This can be accomplished, but requires fronting the Liferay instance with something else like an Apache HTTP Server instance, using mod_rewrite rules.Additionally, assuming that each community has a page with a URL name of
/home, I have the following rewrite rule in such an Apache HTTP Server instance:This ensures that the root of each virtual host is served by each community’s “home page”.