1 Reply Latest reply on Dec 20, 2011 4:00 PM by nayabinghi

    virtual-server root war and access-log

    jblaplace

      Hello,

       

      I am facing a few issues with JBoss AS 7 in standalone mode.

      I hava deployed a WAR file and I see itdeployed by the DeploymentScanner Thread.

      Let's call that war file app1.war

       

      Now I would like for that app1.war to become the root war for a given virtual host.

       

      I have edited standalone.xml as follow:

         <subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="default-host">
              <connector name="http" protocol="HTTP/1.1" socket-binding="http" scheme="http"/>
              <virtual-server name="default-host" enable-welcome-root="true">
                  <alias name="localhost"/>
                  <alias name="example.com"/>
              </virtual-server>
              <virtual-server name="jbtest1.localhost" default-web-module="app1.war">
                  <access-log/>
          </subsystem>

       

      When I access http://jbtest1.localhost:8080 I get a blank page. I also get a blank page by accessing http://jbtest1.localhost:8080/app1

      On the other hand http://localhost:8080/app1 display the proper content served by the application.

      How do I make the app1.war available to the virtual-server jbtest1.localhost ?

       

      Also, in order to try to debug this issue I wanted to enable the access-log for jbtest1.localhost. At first I tried to add the 'path' attribute to the <access-log> element but I then got a parsing error. What is the proper syntax for the <access-log> element ? The AccessLog valve refers to a 'directory' attribute but this also fails.

       

      Thank you for your help and time.

       

      JB

        • 1. Re: virtual-server root war and access-log
          nayabinghi

          Hi,

           

          Wondering if you ever got this resolved. I am having the same exact problem. Seams like virtual-server feature does not work or some other configuration is required

           

          <subsystem xmlns="urn:jboss:domain:web:1.0" default-virtual-server="dev1.net">

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

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

                      <virtual-server name="dev1.net" default-web-module="helloworld">

                          <alias name="www.dev1.net"/>

                      </virtual-server>

                      <virtual-server name="dev2.net" default-web-module="Calendar">

                          <alias name="www.dev2.net"/>

                      </virtual-server>

                  </subsystem>

           

          With the configuration above am able to get to http://dev1.net:8080/hi.jsp and I see the helloworld application just fine. But if I go to http://dev2.net:8080 which is where the Calendar application is at I get a blank page.  If I set "default-virtual-server=dev2.net" I then get to see the dev2 app but not dev1. Looks like default-virtual-server is controlling what host/application is served but how can this be changed so one can have multiple applications served over different hosts. You help will be greatly appreciated.

           

          Thanks,

          Mohamed