Solution: Using mod_jk with Alfresco

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2009 06:19 AM
Since I needed a "Webserver" way to access Alfresco i figured out a way to use mod_jk with Alfresco.
My system is a ubuntu 9.04-server (32bit).
First I installed mod_jk
then in the /etc/apache2 apache2.conf file I added the following at the end:
then i added a file called "workers.properties" to /etc/apache2/ with the following content:
then I added the mountpoints to the virtual host file (/etc/apache2/sites-enabled/000-default)
finally I added a endpoint in the repository for the AJP13 connection.
edit file /opt/Alfresco/tomcat/conf/server.xml
after this part:
add the following line:
then restart Alfresco and when Alfresco is running restart apache2.
Works fine for me. Now my ppl can access Alfresco like http://intranet/alfresco
My system is a ubuntu 9.04-server (32bit).
First I installed mod_jk
apt-get install libapache2-mod-jk
then in the /etc/apache2 apache2.conf file I added the following at the end:
JkWorkersFile /etc/apache2/workers.properties# Where to put jk logsJkLogFile /var/log/apache2/mod_jk.log# Set the jk log level [debug/error/info]JkLogLevel info# Select the log formatJkLogStampFormat "[%a %b %d %H:%M:%S %Y] "# JkOptions indicate to send SSL KEY SIZE,JkOptions +ForwardKeySize -ForwardDirectories# JkRequestLogFormat set the request formatJkRequestLogFormat "%w %V %T"# Send servlet for context /alfresco to your repositoryJkMount /alfresco worker1# Send JSPs for context /alfresco/* to your repositoryJkMount /alfresco/* worker1
then i added a file called "workers.properties" to /etc/apache2/ with the following content:
workers.tomcat_home=/opt/Alfresco/tomcatworkers.java_home=/usr/lib/jvm/java-6-sun-1.6.0.13/ps=/worker.list=worker1worker.default.port=8009worker.default.host=localhostworker.default.type=ajp13worker.default.lbfactor=1
then I added the mountpoints to the virtual host file (/etc/apache2/sites-enabled/000-default)
JkMountCopy On JkMount /alfresco worker1 JKMount /alfresco/* worker1
finally I added a endpoint in the repository for the AJP13 connection.
edit file /opt/Alfresco/tomcat/conf/server.xml
after this part:
<!– A "Connector" represents an endpoint by which requests are received and responses are returned. Documentation at : Java HTTP Connector: /docs/config/http.html (blocking & non-blocking) Java AJP Connector: /docs/config/ajp.html APR (HTTP/AJP) Connector: /docs/apr.html Define a non-SSL HTTP/1.1 Connector on port 8080 –>
add the following line:
<!– Define an AJP 1.3 Connector on port 8009 –> <Connector port="8009" enableLookups="false" redirectPort="8442" protocol="AJP/1.3" />
then restart Alfresco and when Alfresco is running restart apache2.
Works fine for me. Now my ppl can access Alfresco like http://intranet/alfresco
Labels:
- Labels:
-
Archive
8 REPLIES 8

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2009 10:03 PM
This works fine for me too. I just wanted to add exposure of share, which may be more appropriate to external clients, by adding the last two lines:
nexuit
JkMountCopy OnJkMount /alfresco worker1JkMount /alfresco/* worker1JkMount /share worker1JkMount /share/* worker1
in /etc/sites-available/default to which /etc/apache2/sites-enabled/000-default is soft-linked.nexuit

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-26-2009 10:15 PM
The code was for /etc/apache2/sites-available/default. Please note apache2 in the path.
nexuit
nexuit

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-27-2009 04:38 AM
Great initiative posting here a way you found to have mod_jk work with Alfresco.
Thank you !
Thank you !
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-10-2009 12:40 PM
Hi, and thanks for this solution… Work great for Alfresco.
I tried to do the same for studio and share, adding to /etc/apache2apache2.conf:
and the following lines to /etc/apache2/sites-enabled/000-default :
I can't login in share and I can't see the login window in Studio. This is the same thing if I only have changed the server.xml to port 80.
Any suggestions?
I tried to do the same for studio and share, adding to /etc/apache2apache2.conf:
JkMount /share worker1JkMount /share/* worker1JkMount /studio worker1JkMount /studio/* worker1
and the following lines to /etc/apache2/sites-enabled/000-default :
JkMountCopy OnJkMount /alfresco worker1JKMount /alfresco/* worker1
I can't login in share and I can't see the login window in Studio. This is the same thing if I only have changed the server.xml to port 80.
Any suggestions?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-06-2010 03:16 AM
ill try to get share work like that and then report you how I didt it but it should work the same way
// you didnt specifie the /share worker in your apache conf
// you didnt specifie the /share worker in your apache conf

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-17-2011 05:23 PM
I did the same in Red Hat and share works fine except.
the My Tasks fails with an outofbounds error.
http://forums.alfresco.com/en/viewtopic.php?f=48&t=36503
the My Tasks fails with an outofbounds error.
http://forums.alfresco.com/en/viewtopic.php?f=48&t=36503
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2011 04:02 AM
hi, thx for the nice howto 
i've got some strange behavior with the login site (share). If i open the login site (http://alfresco/share/page/site-index) with firefox i can see the html code :shock:
if i open the http://alfresco/share/page/site-index.html (with suffix .html) there is a redirect to http://alfresco/share/page/site-index and i can normally login….
any help?

i've got some strange behavior with the login site (share). If i open the login site (http://alfresco/share/page/site-index) with firefox i can see the html code :shock:
<html><head><meta http-equiv="Refresh" content="0; url=/share/page?pt=login"></head><body><p>Please <a href="/share/page?pt=login">log in</a>.</p></body></html>
if i open the http://alfresco/share/page/site-index.html (with suffix .html) there is a redirect to http://alfresco/share/page/site-index and i can normally login….
any help?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-24-2011 10:09 AM
hi, thx for the nice howto
i've got some strange behavior with the login site (share). If i open the login site (http://alfresco/share/page/site-index) with firefox i can see the html code :shock:
any help?
check your conf for Apache and see what your default index types are.
