Usaing JWMA with mod_jk / Apache

2001-05-31
2001-05-31
  • Eric Hancock

    Eric Hancock - 2001-05-31

    It seems that the only reason jwma won't work out of the box with tomcat / apache and mod_jk is that the automatically generated file only serves jsps and things under the /servlet directory through tomcat.  For example, in the mod_jk.conf_auto file, you see the follwoing mounts:

    JkMount /webmail/servlet/* ajp12
    JkMount /webmail/*.jsp ajp12

    However, if you change the mounts to:

    JkMount /webmail/servlet/* ajp12
    JkMount /webmail/* ajp12

    everything should work fine.  I'm not at all familiar with how tomcat generates that file, but maybe we could put a note in the installation docs mentioning this.

     
    • Jim Bishop

      Jim Bishop - 2001-05-31

          I have actually had this working for quite some time. Build and configure Apache with SSL and make that work first.
          When you start Tomcat it creates a file <path-to>/jakarta-tomcat-3.2.1/conf/mod_jk.conf-auto. You can include this at the bottom of your httpd.conf file but as you note webmail will not work. I copied the -auto file to mod_jk.conf. I added
      Include <Path-to>/jakarta-tomcat-3.2.1/conf/mod_jk.conf to the bottom of my  httpd.conf file.
          I added some URL rewritting with Apache mod_rewrite and redirect all webmail traffic to an encrypted SSL session.
          I restarted Apache to get the new info and all went well. An excerpt from my mod_jk.conf is as follows:

      Alias /webmail "/usr/local/jboss/jakarta-tomcat-3.2.1/webapps/webmail"
      <Directory "/usr/local/jboss/jakarta-tomcat-3.2.1/webapps/webmail">
          Options None
          AllowOverride None
          Order Allow,Deny
          Allow from all
      </Directory>
      the /servlet/ uri to tomcat
      JkMount /webmail/* ajp13
      JkMount /webmail/*.jsp ajp13
      <Location "/webmail/WEB-INF/">
          AllowOverride None
          deny from all
      </Location>
      <Location "/webmail/META-INF/">
          AllowOverride None
          deny from all
      </Location>

      I am not much of a java developer and am sure that there is a better way to do the servlet mapping than I did here but I know it works.
           As a further aside, my Tomcat is actually residing inside of a jboss servlet container should anyone want some added info on that as well.

       

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks