3 Replies Latest reply on Dec 1, 2004 1:54 PM by shankris

    Tomcat does not seem to forward image requests to apache..

    shankris

      Hi all
      I am a newbie to JBOss 3.2.6. I have followed the instructions found in http://www.jboss.org/wiki/Wiki.jsp?page=UsingMod_jk1.2WithJBoss to the best of my knowlege. However the apache server I have does not seem to receive the requests from Tomcat. I doubt if Tomcat forwards any requests for images to apache at all. How do I figure this out?

      However, when I invoke a url of an image object directly (port 80) in apache, it does work. (Actually, I have a RedirectMatch directive which actually forwards the requets for all .gif files to another static content server - which might not be relevant at all to the current topic I am writing..).

        • 1. Re: Tomcat does not seem to forward image requests to apache
          luc.texier

          Tomcat doesn't send requests to Apache. In fact, this is the way around. Based upon the mod_jk conf (and the JkMount directive), Apache will delegate the processing of dynamic content (ie jsp/servlet) to Tomcat.

          See section "Assigning URLs to Tomcat" in this page
          http://tom.unitn.it:8080/tomcat-docs/jk2/jk/aphowto.html

          Post the content of mod-jk.conf so we can help you.

          • 2. Re: Tomcat does not seem to forward image requests to apache
            shankris

            mod-jk.conf:
            --------------
            1 # Load mod_jk module
            2 # Specify the filename of the mod_jk lib
            3 LoadModule jk_module modules/mod_jk.so
            4 # Where to find workers.properties
            5 JkWorkersFile conf/workers.properties
            6 # Where to put jk logs
            7 JkLogFile logs/mod_jk.log
            8 # Set the jk log level [debug/error/info]
            9 JkLogLevel info
            10 # Select the log format
            11 JkLogStampFormat "[%a %b %d %H:%M:%S %Y]"
            12 # JkOptions indicates to send SSK KEY SIZE
            13 JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories
            14 # JkRequestLogFormat
            15 JkRequestLogFormat "%w %V %T"
            16 JkMount /*.jsp node1

            workers.properties (I don't need load balancing; hence only one node)
            -----------------------
            1 worker.list=node1
            2 worker.node1.type=ajp13
            3 worker.node1.host=localhost
            4 worker.node1.port=8009
            5 worker.node1.lbfactor=1
            6 #worker.node1.local_worker=1 (1)
            7 worker.node1.cachesize=10

            The mod-jk.conf is getting included in the http.conf file.

            Thanks for your immediate response.

            • 3. Re: Tomcat does not seem to forward image requests to apache
              shankris

              Redid the whole thing per the documentation. Now it works. Thanks. Wonder what I did wrong..