1 Reply Latest reply on Oct 3, 2012 7:09 PM by Bob Muller

    AS7 with Apache mod_proxy and ROOT.war gets HTTP 404 error

    Bob Muller Novice

      I am setting up a one-web-app JBoss AS7 server. I want the web app to run as root (ROOT.war). I am front-ending JBoss with Apache2 using mod_proxy with a simple proxy. I'll try to give all the pieces of the configuration here.

       

      I am using an exploded deployment by linking (ln -s) ROOT.war to a directory on the server. I use ROOT.war.dodeploy to deploy the web app, and the server log shows that happens without error. JBoss is listening for HTTP on port 8080.

       

      Here's the JBoss standalone.xml configuration for the virtual machine in the web subystem:

       

       

              <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host">
                  <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
                  <virtual-server name="default-host" enable-welcome-root="false">
                      <alias name="localhost"/>
                      <alias name="seqviewer.arabidopsis.org"/>
                  </virtual-server>
              </subsystem>
      
      

       

      I am using the alias name localhost as the incoming host name for now.

       

      Here's the jboss-web.xml virtual host specification:

       

       

      <jboss-web>
                <context-root>/</context-root>
                <virtual-host>localhost</virtual-host>
      </jboss-web>
      
      

       

      I am using the root context with the localhost virtual host.

       

      Here's the mod_proxy setup in httpd.conf

       

      ProxyPass       /       http://localhost:8080/
      ProxyPassReverse        /       http://localhost:8080/
      

       

      I am doing all this in a kvm virtual machine configured with SELinux, and I have used this command to enable httpd access:

       

      sudo setsebool -P httpd_can_network_connect 1
      

       

      The name of the VM is falklands.tairgroup.org. The URL:

       

      http://falklands.tairgroup.org
      

       

      should bring up the web app's index.html. Instead I get an HTTP status 404: The requested resource (/) is not available..

       

      ps tells me jboss is running just fine (and the server.log confirms error-free startup), and lsof tells me jboss is listening on port 8080.

       

      What am I missing in the various linkages?

        • 1. Re: AS7 with Apache mod_proxy and ROOT.war gets HTTP 404 error
          Bob Muller Novice

          After much debugging and trial-and-error, here's the real problem:

           

          I am using an exploded deployment by linking (ln -s) ROOT.war to a directory on the server.

           

          Unfortunately, in JBoss AS7 you can't do that anymore. In earlier versions, server.xml allowed you to set the Tomcat kludge "allowLinks", but that has disappeared with the new configuration integration.

           

          So the bottom line is, use a real war file or an in-place exploded deployment, don't try symbolic linking to another directory as your war deployment.