2 Replies Latest reply on Nov 19, 2003 4:02 AM by Randahl Fink Isaksen

    Setting up Virtual Host on Tomcat

    Sloan Bowman Newbie

      For those of you that have had trouble setting up Virtual Host on JBoss 3.2.1 Tomcat 4.1.24 bundle below is a quick and easy example to use.

      Lets say you have a domain name www.xyz.com and you want to setup a virtual host entry for this domain name. The first thing you need to do is create a jboss-web.xml file and specify at least the settings below in that file.

      Example jboss-web.xml:

      <?xml version="1.0"?>
      <!DOCTYPE jboss-web>

      <jboss-web>
      <context-root>/</context-root>
      <virtual-host>www.xyz.com</virtual-host>
      </jboss-web>

      Place this file inside the WEB-INF directory of your web application.

      Next you need to configure your tomcat and make sure you have a coresponding host entry inside your /server/default/deploy/jbossweb-tomcat.sar/META-INF/jboss-serivice.xml.
      An example is below

      Example jboss-service.xml







      <!-- Access logger -->


      <!-- Default context parameters -->
      <DefaultContext cookies = "true" crossContext = "true" overrid
      e = "true" />


      <!-- Contman.athlonsports.com -->





      With these files editing create your application and deploy it. The only other steps you may need to make are adding a entry into your system hosts file. I hope this helps all of those that have been having problems trying to create virtual host.