[SLE] tomcat 5 vhost

From: Marc Wetselaar (marcw_at_linux.co.za)
Date: 07/29/05

  • Next message: a.bridge_at_insightbb.com: "[SLE] SPAM Filtering"
    Date: Fri, 29 Jul 2005 14:43:13 +0200
    To: suse-linux-e@suse.com
    
    

    Hi All

     

    I am running a SLES9 box as a web server and need to add virtual hosts to
    the server.xml file on tomcat. There is no apache on the box so it can't be
    done there. What do I need to add and where? There is currently one domain
    running a site on the server at the moment.

     

    Essentially

    Under <host

    name is obviously www.domain1.com <http://www.domain1.com/> and
    www.domain2.com <http://www.domain2.com/> etc.

    I don't know what the appBase is, is it the same for all domains since they
    all stem from webapps

    What is the docBase for the below directories?

    In the below example what is the path="" for and what should it be?

    And can the context path be left blank ""?

     

    The directory which has the sites is setup like this.

    /data01/webapps/domain1 (default domain)

    /data01/webapps/domain2

    /data01/webapps/domain3

    ETC

     

    This is the section from my current server.xml

     

    <!-- Define the default virtual host Note: XML Schema validation will not
    work with Xerces 2.2.

           -->

          <Host name="localhost" debug="0" appBase="webapps"

           unpackWARs="true" autoDeploy="true"

           xmlValidation="false" xmlNamespaceAware="false">

     

    I have found this example but can't seem to get it to work.

     

        <Engine name="Standalone" defaultHost="localhost" debug="0">

          <!-- This Host is the default Host -->

          <Host name="localhost" debug="0" appBase="webapps"

                      unpackWARs="true" autoDeploy="true">

            <Context path="" docBase="ROOT" debug="0"/>

            <Context path="/orders" docBase="/home/ian/orders" debug="0"

                           reloadable="true" crossContext="true">

            </Context>

          </Host>

     

        <!-- This Host is the first "Virtual Host": www.domain1.com -->

          <Host name="www.domain1.com" appBase="/home/example/webapp">

          <Context path="" docBase="."/>

          </Host>

     

    Regards

    Marc

    marcw@linux.co.za

     


  • Next message: a.bridge_at_insightbb.com: "[SLE] SPAM Filtering"

    Relevant Pages

    • apache tomcat?
      ... As a tomcat newbie, I am confused if apache tomcat is a web server ...
      (comp.lang.java.help)
    • Re: apache tomcat?
      ... >As a tomcat newbie, I am confused if apache tomcat is a web server ... Tomcat will serve static HTML pages. ... >and then apache to make them work together. ...
      (comp.lang.java.help)
    • Re: jboss/tomcat - do i need a webserver?
      ... I get the impression that Apache is pretty slow. ... IIRC) perform faster than Tomcat under very heavy load. ... - Apache is the de facto standard web server, ...
      (comp.lang.java.programmer)
    • Re: Difference between Apache Web Server and Tomcat Server
      ... tomcat is a servlet container. ... You make it sound like Tomcat cannot act as a web ... Tomcat can run either in stand-alone mode or "connected" to Apache. ... Tomcat is actually, for many uses, a very good web server. ...
      (comp.lang.java.programmer)
    • Re: apache tomcat?
      ... >Yes, tomcat is a web server by itself, but I believe its recommended ... >apache, and forward servlet/jsp requests to Tomcat. ... Apache can serve ...
      (comp.lang.java.help)