1 Reply Latest reply on Oct 29, 2013 11:05 PM by joshva

    Jboss throwing 404 via AJP but not via HTTP - Any thoughts as to why?

    joshva

      Hi,

       

      I'm trying to get jboss working via AJP. I've installed mod_jk and configured it following the guides. I am using a virtual host. All configuration is copied below. Basically the link works when run directly to jboss but not when via AJP. Please note right now i have bound jboss to 127.0.0.1 so http isn't open to the public. Any help would be AWESOME!!!

       

      Working URL: http://<our ip address>:8081/ServerWeb/ImageProcessor?image.jpg


      Broken URL: http://staging.ourserver.com/images/ServerWeb/ImageProcessor?image.jpg



      httpd.conf

       

      Include "/usr/local/apache/conf/includes/pre_virtualhost_2.conf"

      Include "/usr/local/apache/conf/mod-jk.conf"


      pre_virtualhost_2.conf


      <VirtualHost *:80>

          ServerName ourserver.com

          ServerAlias www.ourservercom

              JkMount /images/* worker1

       

       

          Options -Indexes FollowSymLinks MultiViews

       

       

          <IfModule mod_rewrite.c>

              Options +FollowSymLinks

          </IfModule>

          <IfModule mod_suphp.c>

              suPHP_UserGroup ourserverourserver

          </IfModule>

      </VirtualHost>

       

       

      # Ourserver Staging #

      <VirtualHost *:80>

         ServerName staging.ourserver.com

              JkMount /images/* worker1

       

       

          Options -Indexes FollowSymLinks MultiViews

       

       

          <IfModule mod_rewrite.c>

              Options +FollowSymLinks

          </IfModule>

          <IfModule mod_suphp.c>

              suPHP_UserGroup ourserver ourserver

          </IfModule>

      </VirtualHost>


      workers.properties


      worker.list=worker1

      worker.worker1.type=ajp13

      worker.worker1.host=localhost

      worker.worker1.port=8010


      mod-jk.conf

       

      # Load mod_jk module

      # Specify the filename of the mod_jk lib

      LoadModule jk_module modules/mod_jk.so

       

       

      # Where to find workers.properties

      JkWorkersFile /usr/local/apache/conf/workers.properties

       

       

      # Where to put jk logs

      JkLogFile /usr/local/apache/logs/mod_jk.log

       

       

      # Set the jk log level [debug/error/info]

      JkLogLevel info

       

       

      # Select the log format

      JkLogStampFormat  "[%a %b %d %H:%M:%S %Y]"

       

       

      # JkOptions indicates to send SSK KEY SIZE

      JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories

       

       

      # JkRequestLogFormat

      JkRequestLogFormat "%w %V %T"

       

       

      # Mount your applications

      JkMount /images/* worker1

       

       

      # You can use external file for mount points.

      # It will be checked for updates each 60 seconds.

      # The format of the file is: /url=worker

      # /examples/*=loadbalancer

      # JkMountFile /usr/local/apache/conf/uriworkermap.properties

       

       

      # Add shared memory.

      # This directive is present with 1.2.10 and

      # later versions of mod_jk, and is needed for

      # for load balancing to work properly

      JkShmFile /usr/local/apache/logs/jk.shm

       

       

      # Add jkstatus for managing runtime data

      <Location /jkstatus/>

              JkMount worker1

              Order deny,allow

              Deny from all

              Allow from 127.0.0.1

      </Location>

       

      standalone.xml

       

      <subsystem xmlns="urn:jboss:domain:web:1.4" default-virtual-server="default-host" instance-id="worker1" native="false">

                  <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>

                  <connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/>

                  <virtual-server name="default-host" enable-welcome-root="true">

                      <alias name="localhost"/>

                      <alias name="staging.ourserver.com"/>

                  </virtual-server>

                  <virtual-server name="ourserver.com"/>

              </subsystem>

       

      <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

              <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:10000}"/>

              <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9991}"/>

              <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9444}"/>

              <socket-binding name="ajp" port="8010"/>

              <socket-binding name="http" port="8081"/>

              <socket-binding name="https" port="8444"/>

              <socket-binding name="remoting" port="4448"/>

              <socket-binding name="txn-recovery-environment" port="4713"/>

              <socket-binding name="txn-status-manager" port="4714"/>

              <outbound-socket-binding name="mail-smtp">

                  <remote-destination host="localhost" port="25"/>

              </outbound-socket-binding>

          </socket-binding-group>

       

      jboss-web.xml

       

      <?xml version="1.0" encoding="UTF-8"?>

      <jboss-web>

        <context-root>/ServerWeb</context-root>

        <virtual-host>default-host</virtual-host>

      </jboss-web>