0 Replies Latest reply on Sep 9, 2003 4:01 PM by strazys

    mod_jk  +  mod_rewrite  =  agony

    strazys Newbie

      My question is wtf doesn't this work?

      I'm using apache 1.3.27 and jboss-3.0.4_tomcat-4.1.12

      And please take note that I *am* using the following JkOptions in my httpd.conf file:

      JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories

      So...... mod_jk works fine. I tried adding in mod_rewrite and now when I go to a page that gets rewritten, the mod_jk doesn't *SEE* the new URI.

      So if I use a jsp URI to begin with, mod_jk picks it up and things work.

      If I use rewrite a URI to a jsp URI, then mod_jk doesn't pick it up and the jsp *code* itself is displayed in my browser window.

      Further, if I use a correct jsp URI but put in a rule to rewrite it to a random URI, then the jsp corresponding to the original URI is shown properly.

      In other words, mod_rewrite is not working AT ALL with mod_jk. WHY NOT???!!

      IS THIS PROBLEM NOT FIXED IN TOMCAT-4.1.12?? That's the only explanation I can think of. I have tried putting mod_jk before mod_rewrite and vice-versa.

      Here's another question...... when people say to put mod_jk before mod_rewrite in the httpd.conf file, do they mean put the entire set of directives before, or just the LoadModule statement? I've tried several ways. None has worked.

      Anyway, here are snippets from my httpd.conf file. Any suggestions to get this far-more-painful-than-it-needs-to-be process working? (The full httpd.conf file WOULD be given as an attachment, but when I try to attach it nothing happens. The attachment post doesn't work on this jboss site.)



      [[ LoadModule and AddModule lines are not pasted below, but are higher up within the httpd.conf file. ]]


      #Include /etc/httpd/conf/mod_jk.conf


      <IfModule mod_jk.c>

      JkWorkersFile /usr/local/jboss/server/default/conf/workers.properties
      JkLogFile /var/tmp/jk.log
      JkLogLevel warn
      JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories

      JkMount /*.jsp ajp13
      JkMount /servlet/* ajp13
      JkMount /xml/servlet/* ajp13






      <IfModule mod_rewrite.c>
      f
      RewriteEngine on
      RewriteLog /etc/httpd/logs/rewrite.log
      RewriteLogLevel 1
      RewriteRule ^/rwtest/(.*)$ /index.jsp [L]