留言板

JkMount for mod_jk using Liferay 5.2.2 and 5.1.2

Tony Lim,修改在15 年前。

JkMount for mod_jk using Liferay 5.2.2 and 5.1.2

Junior Member 帖子: 90 加入日期: 09-4-15 最近的帖子
Hello

I have my server setup using Apache 2.2, mod_jk, tomcat 6 and Liferay 5.2.2 and 5.1.2.

What do I mount mod_jk to? what are all the directories? How do I find out which ones liferay uses?

Right now i'm using

JkMount /* ajp13  


which mounts everything. But I'm using some paths in Apache so I need to be more specific.

Thanks

Tony
baskar govindasamy,修改在15 年前。

RE: JkMount for mod_jk using Liferay 5.2.2 and 5.1.2

New Member 帖子: 10 加入日期: 09-4-8 最近的帖子
Hi Tony,

Do you know the root context for Liferay 5.2.2 and 5.2.1 that you have deployed on Tomcat?

If you would like to mount specific context, here is the example:

Add the below lines in your httpd.conf file:

LoadModule jk_module <PATH>mod_jk.so

JkWorkersFile <PATH>/workers.properties
JkLogFile <PATH>/apache_mod_jk.log
JkLogLevel error
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
JkRequestLogFormat "%w %V %T"
JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
JkShmFile <PATH>/jk.shm
JkShmSize 256
JkMountFile <PATH>/uriworkermap.properties

----workers.properties Contents -----

worker.list=ajp13
worker.ajp13.type=ajp13
worker.ajp13.host= <your tomcat host IP or Host name>
worker.ajp13.port=8009<your tomcat port>
worker.jkstatus.type=status

---uriworkermap.properties contents- has specific uri----
Assumed liferay522 and liferay521 are the context root, Apache uses ajp13 service name to access the resources
/liferay522/*=ajp13
/liferay522=ajp13
/liferay521/*=ajp13
/liferay521=ajp13

Hope this helps

-Baskar Govindasamy
Tony Lim,修改在15 年前。

RE: JkMount for mod_jk using Liferay 5.2.2 and 5.1.2

Junior Member 帖子: 90 加入日期: 09-4-15 最近的帖子
Hi,

Thanks for the tip. Actually I'm running both on a separate tomcat servers. Both on root.

Right now I have:

JkMount /web ajp13
JkMount /web/* ajp13

JkMount /c ajp13
JkMount /c/* ajp13

JkMount /c ajp13
JkMount /c/* ajp13
JkMount /language ajp13
JkMount /language/* ajp13
JkMount /html ajp13
JkMount /html/* ajp13
JkMount /image ajp13
JkMount /image/* ajp13
JkMount /liferay-jedi-theme ajp13
JkMount /liferay-jedi-theme/* ajp13
JkMount /layouttpl ajp13
JkMount /layouttpl/* ajp13

JkMount /group ajp13
JkMount /group/* ajp13

JkMount /user ajp13
JkMount /user/* ajp13

But some scripting is still coming up weird unless I change back to (/*). any help?

Thanks
thumbnail
Ben Davis,修改在15 年前。

RE: JkMount for mod_jk using Liferay 5.2.2 and 5.1.2

Junior Member 帖子: 77 加入日期: 07-5-3 最近的帖子
Have you tried the JkUnMount directive? Do a JkMount /* and then JkUnMount the ones you want Apache to handle.
Another solution is to move liferay out of the ROOT context.
Tony Lim,修改在15 年前。

RE: JkMount for mod_jk using Liferay 5.2.2 and 5.1.2

Junior Member 帖子: 90 加入日期: 09-4-15 最近的帖子
thanks, I didn't know there was a 'JkUnMount' option. Worked out great.
thumbnail
Olaf Kock,修改在15 年前。

RE: JkMount for mod_jk using Liferay 5.2.2 and 5.1.2

Liferay Legend 帖子: 6403 加入日期: 08-9-23 最近的帖子
Ben Davis:
Have you tried the JkUnMount directive?

Thanks, this will definitely make it to my toolbox.
However, with Liferay I prefer to change the root context, as you'll never know what URLs or directories might be handled/required for future versions. I wouldn't want to change the defaults then, when google already knows what is in my /movies directory, when liferay 8.0 decides to also handle /movies in addition to /images etc. With changing the root context, everything liferay-related (apart from additional portlets and themes) is on its own (single) directory/context/url.
Rob Silver,修改在10 年前。

RE: JkMount for mod_jk using Liferay 5.2.2 and 5.1.2

Junior Member 帖子: 47 加入日期: 13-6-20 最近的帖子
This may be relevant but I am using Liferay 6.1.1 but I get the mod_jk to basically work except
when I type in the URL: say http://myhost I get the index page /var/www/html/index.html instead of the portal , however
if I type in http://myhost// I get the portal. which does not seem correct
How to I get the url: http://myhost/ to bring up the portal
Here is my apache http.conf statements for jk_mod portion:
LoadModule jk_module modules/mod_jk.so
JkWorkersFile conf/workers.properties
JkMount /* worker1
JkUnMount /index.html /var/www/html/index.html


Any ideas how to to fix this? so that http://myhost/ brings up the Liferay Portal?