1 2 Previous Next 16 Replies Latest reply on Sep 7, 2012 3:57 AM by Matthias Reining

    Interaction between virtual-server (in standalone.xml) and virtual-host (in jboss-web.xml)

    Matthias Reining Newbie

      I try to use virtual-server like descriped in the wiki (https://community.jboss.org/wiki/VirtualHostsWithJBossAS7)

      One JBoassAS 7 for several domains (www.mydomain1.de, www.mydomain2.de); every domain should have it's own web app (as root).


      When I only define the virtual-server in standalone.xml nothing happens....


           <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 name="mydomain1" default-web-module="myapp">
                     <alias name="mydomain.de"/>
                     <alias name="www.mydomain1.de"/>


      When I define additionally a virutal-host in jboss-web.xml inside my webproject (myapp\WEB-INF\jboss-web.xml) it works!


      <?xml version="1.0" encoding="UTF-8"?>
      <jboss-web xmlns="http://www.jboss.com/xml/ns/javaee"
         xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-web_5_1.xsd">



      When I have this jboss-web.xml inside my project I'm not able to start the web app under localhost (from eclipse).


      I don't want to modifiy the jboss-web.xml for every production deployment! (very ugly!)


      What's the normal way to develop a web app (local) and deploy them on JBossAS 7 reachable under a different domain?


        1 2 Previous Next