cancel
Showing results for 
Search instead for 
Did you mean: 

Alfreso with Apache + Tomcat

mayuresh
Champ in-the-making
Champ in-the-making
Hi

Firstly apologies if this has been covered elsewhere already. I've looked and the only documents I can find are from a few years back – none of which seem to do what I want to do.

I've got Alfreso working from the Windows Tomcat packaged ZIP (filename: alfresco-community-tomcat-3.2.zip). This is on a clean Windows 2003 server install. On the same box I also have Apache running as expected as serving pages for all requests on port 80.

However I can't find any reliable documentation for exactly how I can get mod_jk to work so all requests are first handled by Apache. I got as far as installing the mod_jk module in Apache but the auto configuration of the mod_jk.conf within Tomcat doesn't seem to work – at which point I'm stuck.

Any help would be greatly appreciated.

Mayuresh
5 REPLIES 5

gronfelt
Champ in-the-making
Champ in-the-making
Exactly what is it that isn't working? Are there any errors in your Apache logs or mod_jk log?

A basic configuration would be pretty simple, something like this (it could be put in httpd.conf directly):


<IfModule !mod_jk.c>
  LoadModule jk_module "/usr/lib/httpd/modules/mod_jk.so"
</IfModule>

JkWorkersFile "conf/workers.properties"
JkLogFile "logs/mod_jk.log"

JkMount /alfresco ajp13
JkMount /alfresco/* ajp13

JkMount /share ajp13
JkMount /share/* ajp13

(of course, you need to make sure that the paths to the lib, conf and log files are correct for your system, I'm not sure how it looks in Windows, since I only work with Linux)

with a workers.properties file looking something like this:

worker.list=ajp13
# Set properties for worker1 (ajp13)
worker.ajp13.type=ajp13
worker.ajp13.host=localhost
worker.ajp13.port=8009

To enable ajp13 in Tomcat you only have to uncomment this connector in server.xml:

    <Connector port="8009" protocol="AJP/1.3" redirectPort="8443" URIEncoding="UTF-8" />

Now, all requests to yourserver/alfresco and yourserver/share should be redirected to Tomcat by Apache.

mayuresh
Champ in-the-making
Champ in-the-making
Thanks very much - it worked first time. I think I'd messed up the workers.property file and its location when I first tried it.

Thanks again,
Mayuresh

mayuresh
Champ in-the-making
Champ in-the-making
Hello again

Now that I've Apache and Tomcat working together I'm trying to take it to the next step but failing. The key thing I need to do is apply a self-signed certificate to Share. In order to do this I have Apache configured with openssl and have also generated the required certificate and private key.

However, I'm really struggling to get vhosts running on Apache and without that can't quite proceed to enabling the certificate. Would really appreciate if you could post the necessary configs for this.

Thanks

Mayuresh

gronfelt
Champ in-the-making
Champ in-the-making
Well, a very basic virtual host setup is just something like this (in httpd.conf):

NameVirtualHost *:443

<VirtualHost *:443>
ServerName domain.com
JkMount /* worker1
SSLCertificateFile /etc/pki/tls/certs/ca.crt
SSLCertificateKeyFile /etc/pki/tls/private/ca.key
SSLEngine on
</VirtualHost>

(The cert locations needs to be changed to the real locations)

Of course, this is a very basic setup, it could be more advanced if more functionality is needed.

mayuresh
Champ in-the-making
Champ in-the-making
Thanks, that worked. I was doing something similar with vhosts on port 80 to get things rolling but for some reason it wasn't having it. It works fine now.

Having said that, I'm now struggling with the IE bug where it keeps warning of insecure content over SSL - thanks to the images embedded. I thought this issue had been fixed (I only downloaded the community version) last week but doesn't look like it has been so far.

Mayuresh