Foren

changing ROOT + proxying = broken chat portlet !

thumbnail
Sebastien Diot, geändert vor 14 Jahren.

changing ROOT + proxying = broken chat portlet !

Junior Member Beiträge: 35 Beitrittsdatum: 10.02.09 Neueste Beiträge
I installed Liferay 5.2.3 Tomcat bundle (new installation, not an upgrade) under Linux, and then followed the following instruction to move the ROOT:

In order to change the Liferay context (non ROOT), to /liferay, with the Tomcat 6.0 Bundle (Liferay version 5.2.2), you have to follow theses steps :

1) Move ROOT.xml to liferay.xml under TOMCAT_HOME/conf/Catalina/localhost
2) Copy all files under TOMCAT_HOME\webapps\ROOT to webapps/liferay.
3) Add entry portal.ctx=/liferay to portal-ext.properties file (don't forget the "/")
4) edit TOMCAT_HOME/conf/Catalina/localhost/liferay.xml : <Context path="/liferay" crossContext="true">


I have now a mostly working portal (for what I've seen), except for the chat-portlet, which looks like:



I have now found the cause, but I'm not sure how to solve it.

In the /liferay/web/guest (or whatever) I found those two problem lines:

<link href="/chat-portlet/css.jsp?browserId=firefox&amp;themeId=classic&amp;colorSchemeId=01&amp;minifierType=css&amp;t=1251289359000" rel="stylesheet" type="text/css">

<script src="/chat-portlet/javascript.js?browserId=firefox&amp;minifierType=js&amp;t=1251289359000" type="text/javascript"></script>


As you can see, the /liferay is missing. I run Tomcat behind Apache, and when I go directly to Tomcat (:8080) the chat works, but obviously is doesn't behind Apache, because Apache is configured like this:

<location liferay>
        Order allow,deny
        Allow from all

        ProxyPass           ajp://127.0.0.1:8009/liferay
        ProxyPassReverse    ajp://127.0.0.1:8009/liferay
</location>


It only recognize /liferay, which is exactly what I want. I want that each and every link that points to parts of Liferay start with /liferay, so that I don't have to reconfigure Apache when something changes in Liferay.

What do I have to change so that the chat-portlet is under /liferay/... ?
thumbnail
Lisa Simpson, geändert vor 14 Jahren.

RE: changing ROOT + proxying = broken chat portlet !

Liferay Legend Beiträge: 2034 Beitrittsdatum: 05.03.09 Neueste Beiträge
2) Copy all files under TOMCAT_HOME\webapps\ROOT to webapps/liferay. <- That should have taken care of it.
thumbnail
Sebastien Diot, geändert vor 14 Jahren.

RE: changing ROOT + proxying = broken chat portlet !

Junior Member Beiträge: 35 Beitrittsdatum: 10.02.09 Neueste Beiträge
First of all, thank you for your reply! Most of my posts in this forum never get any answers at all! Not even when I mention I found a bug, and where it is on which line in which file, and what goes wrong! Feels like there's a big warning sign next to my profile picture saying "DON'T ANSWER THIS USER!" emoticon

Now, for your answer: If that was so easy... I tried that too, among many things. The problem is that "chat-portlet", and all the "optional" stuff, gets put directly under webapps/, instead of under webapps/ROOT, so moving ROOT to something else doesn't help, and only some of the things directly under webapps/ work if moved somewhere else. Most things seem to break, "chat-portlet" included.

I assume that anyone that wants to do that uses mod_proxy_html to parse, analyze, and rewrite the whole HTML of Liferay and change the URLs, but I am running in a VM, and this is just too CPU intensive for me (not to mention that I don't trust such hacks as reliable, considering the amount of javascript involved). I really don't think it's too much to ask that it be possible to move the whole of Liferay under another context.

I have given up, as it seems impossible, but I'd still be very interested in a detailed explanation if someone actually managed to do that and it worked (without having to rewrite all of Liferay HTML, or having to change Apache's config file by adding a new rewrite-rule every time I install a new plug-in).
thumbnail
Lisa Simpson, geändert vor 14 Jahren.

RE: changing ROOT + proxying = broken chat portlet !

Liferay Legend Beiträge: 2034 Beitrittsdatum: 05.03.09 Neueste Beiträge
I've not had any problems but I run mod_proxy and point the whole apache instance over to Liferay. Since it's still deploying in the ROOT directory, there's probably a config that needs to be edited somewhere. What version of Liferay are you using? 5.2.3 seems to be working fine for us...