2 Replies Latest reply on Mar 8, 2011 1:08 PM by schueffi

    Setting up Virtual hosts without updating server.xml

    chfarooq

      Hi

       

      I wanna add V-hosts to my application but I don't want to add Host tags in server.xml as explained in some posts. Is there anyother way to do it. I am running Jbos 5.1.0.

       

      Best regards

       

      Farooq Ahmad    

        • 1. Setting up Virtual hosts without updating server.xml
          wdfink

          Do you want to run the complete JBoss with a V-host binding?

          Use 'run.sh -b <your host>' for this.

          • 2. Setting up Virtual hosts without updating server.xml
            schueffi

            Hi

             

            in order to set up new virtual hosts in tomcat (embedded web server in jboss), you have two options:

             

            - add the corresponding host entries into server.xml. This is persistent across server restarts, but it also requires a full server restart in order to load the changes in server.xml (i.e. there is no hot reload of this config file).

             

            - add them dynamically to tomcat/jboss instantly without restart by using the tomcat host manager (do not mix this with the tomcat manager - this is a complete different application). The tomcat host manager is not installed by default in jboss - you can either download and extract it from the original tomcat distribution, or - for your convenience - download it from our servers:

             

            http://www.softgarden.de/jboss/host-manager.war

             

            Install this war into your deployment directory in jboss (and configure it to your needs: security, ...).

            Then, you can add the hosts dynamically by invoking simple web requests like this:

             

            http://jbosshost:port/host-manager/add?name=www.example-new-vhost.com

             

            Beware, those dynamically added hosts are not persistent across jboss/tomcat restarts - so you have to add them to your server.xml file also.

             

            Regards,

            Stefan