Uploaded image for project: 'Application Server 7'
  1. Application Server 7
  2. AS7-3108

Web Subsystem Only Serves default-virtual-server

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 7.0.2.Final
    • Web
    • Hide

      Add multiple virtual-servers to standalone.xml like the example below and visit access them from a browser.

      <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>

      Show
      Add multiple virtual-servers to standalone.xml like the example below and visit access them from a browser. <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>

      Seams like the web-subsystem only serves content from the defined "default-virtual-server". Application/web-module for all other virtual-servers returns a blank page.

      <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.

              rmaucher Remy Maucherat
              nayabinghi Mohamed King (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: