Apache ProxyPass and Tomcat proxyPort proxyName

Discuss the Scalix web client

Moderators: ScalixSupport, admin

joaquindromero

Apache ProxyPass and Tomcat proxyPort proxyName

Postby joaquindromero » Thu Feb 03, 2005 12:47 am

I am trying to use my Apache server on another box to proxy Scalix web access on my scalix server. I currently have Apache set up to proxy and in fact am doing it for another site I host.

I have Apache Configured in the following way:
<VirtualHost *:80>
ServerName server.com
ServerAlias thedomainiwant.com
ProxyPass / http://localscalixserver:8080/webmail/
ProxyPassReverse / http://localscalixserver:8080/webmail/
</VirtualHost>

Finally,I have Tomcat setup as such:

<Connector className="org.apache.catalina.connector.http.HttpConnector"
port="8080"
proxyName="thedomainiwant.com"
proxyPort="80"/>

When I access my site I get the Scalix login but I get errors like this:
Object Expected
Object doesnt support this property or method

I have read up on what to do with Tomcat so it will serve out correctly through an Apache proxy but no luck.

I have changed the conf and xml files so much I probably created a small error that is screwing me up but... can someone please help?

Is there anyone out there proxying through Apache to their SWA?

Thanks

ScalixSupport
Scalix
Scalix
Posts: 5503
Joined: Thu Mar 25, 2004 8:15 pm

Postby ScalixSupport » Thu Feb 03, 2005 5:33 am

We use mod_jk2. You can get a binary from http://apache.intissite.com/jakarta/tomcat-connectors/jk2/binaries/linux/. There are currently only binaries for FC1,SuSE 9.0 and SLES but the FC1 version definitely works on FC2.

You should make the following modifications to your Apache config:

1) Add a file $APACHE_HOME/conf/workers2.properties with the following contents:

Code: Select all

# Define the communication channel (default AJP13 Tomcat port is 8009)
[channel.socket:localhost:8009]
info=Ajp13 forwarding over socket
tomcatId=localhost:8009

# Map the Tomcat URI to the Web Server URI space
[uri:/webmail/*]
info=Map the SWA app

[uri:/sac/*]
info=Map the SAC app

[uri:/caa/*]
info=Map the link between SAC and Ubermanager


Obviously you will need to change localhost to be the name of your SWA server.

2) Add a file $APACHE_HOME/conf.d/webmail.conf with the following contents:

Code: Select all

LoadModule jk2_module modules/mod_jk2.so

<Location />
  AddOutputFilterByType DEFLATE text/xml text/html text/css
  AddOutputFilterByType DEFLATE application/x-javascript
</Location>


Note: The <Location> stanza is probably not needed if you don't require compression on your data stream.

3) Copy mod_jk2.so to $APACHE_HOME/modules and make sure that the permissions are:

Code: Select all

-rwxr-xr-x  1 root root


4) Restart your Apache server.

Cheers

Dave.
Last edited by ScalixSupport on Tue Oct 11, 2005 6:06 pm, edited 1 time in total.

axsom1
Posts: 69
Joined: Tue Aug 17, 2004 12:31 pm

Postby axsom1 » Thu Jul 14, 2005 12:23 pm

How would you go about adding SSL capabilities to this configuration?

I'm having a hard time finding anything out there that talks about Apache + Tomcat + SSL.

Any help would be greatly appreciated.

Thanks,
John

axsom1
Posts: 69
Joined: Tue Aug 17, 2004 12:31 pm

Postby axsom1 » Thu Jul 14, 2005 3:30 pm

Nevermind the SSL through apache stuff. I ended up dumping mod_jk2 and going with mod_jk.

Thanks,
John

ScalixSupport
Scalix
Scalix
Posts: 5503
Joined: Thu Mar 25, 2004 8:15 pm

Postby ScalixSupport » Thu Jul 14, 2005 7:00 pm

axsom1 wrote:Nevermind the SSL through apache stuff. I ended up dumping mod_jk2 and going with mod_jk.


Can I ask why ?

Cheers

Dave

axsom1
Posts: 69
Joined: Tue Aug 17, 2004 12:31 pm

Postby axsom1 » Thu Jul 14, 2005 7:45 pm

Well it just seemed easier to setup. I found more documentation for mod_jk also, but just adding JkMount /webmail/* webmail to a virtual host seemed easier for me.

I'm sure there are better ways to do this, which I'm all open for suggestions.

I guess I could just add a rewrite rule in apache for the webmail space... :idea:

Anyhoot, the whole thing started with trying to secure just the one section of an external site to allow remote users to login to their mail from home.

John

Valerion
Scalix Star
Scalix Star
Posts: 2730
Joined: Thu Feb 26, 2004 7:40 am
Location: Johannesburg, South Africa
Contact:

Postby Valerion » Mon Jul 18, 2005 2:59 am

ScalixSupport wrote:
axsom1 wrote:Nevermind the SSL through apache stuff. I ended up dumping mod_jk2 and going with mod_jk.


Can I ask why ?


I have been playing with inegrating mod_jk and mod_jk2 on my server too. My main concern is future support and coding from the Jakarta project.

http://jakarta.apache.org/site/downloads/downloads_tomcat-connectors.cgi lists mod_jk2 as deprecated, and both http://apache.is.co.za/dist/jakarta/tomcat-connectors/ and http://apache.is.co.za/dist/jakarta/tomcat-connectors/jk2/ lists it as unsupported since November 2004, recommending mod_jk for this purpose.


Return to “Scalix Web Access”



Who is online

Users browsing this forum: No registered users and 3 guests