1 Reply Latest reply on Mar 31, 2003 5:30 PM by rajivhs

    How do I set up multiple sites using One IP and host headers

    jlisson

      Hi guys, I have 2 domains registered, which pointing to my server with the same IP address. Each address should point to a different web application. How can I do that in JBOSS. I heared about setting Host Headers.
      For example:
      www.domain1.com calls the webapp app1.war
      www.domain2.com calls the webapp app2.war
      Both war files are located in the default/deploy directory on the same server and the same JBOSS instance. Does somebody has an solution for that?
      Thanks, Johann

        • 1. Re: How do I set up multiple sites using One IP and host hea
          rajivhs

          Try this. It may work. I tried it before it worked but it was a little flaky. I did not put it in production. I used a web forward for one of the sites.

          Copy this into app1.war/jboss-web.xml
          <jboss-web>
          <context-root>/</context-root>
          <virtual-host>www.domain1.com</virtual-host>
          </jboss-web>

          Copy this into app2.war/jboss-web.xml
          <jboss-web>
          <context-root>/</context-root>
          <virtual-host>www.domain2.com</virtual-host>
          </jboss-web>