Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Open the config.xml file located in the <geronimo_home>/var directory and look for the following line <module name="org.apache.geronimo.configs/tomcat/1.2-SNAPSHOT/car">. This is the beginning of the Tomcat configuration module, all the additional virtual host configuration will be done immediately after this line.

To define the first HostGBean TomcatVirtualHost_1 add the following lines right after <module name="org.apache.geronimo.configs/tomcat/1.2-SNAPSHOT/car">.

Code Block
xml
xml
borderStylesolid
titleExcerpt from config.xml
...
<gbean gbeanInfo="org.apache.geronimo.tomcat.HostGBean" name="org.apache.geronimo.configs/tomcat/1.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat/1.2-SNAPSHOT/car,j2eeType=Host,name=TomcatVirtualHost_1">
<attribute name="className">org.apache.catalina.core.StandardHost</attribute>
<attribute name="initParams">name=virtualhost1.com
       appBase=
       workDir=work</attribute>
</gbean>
...

...

Code Block
xml
xml
borderStylesolid
titleExcerpt from config.xml
...
<gbean gbeanInfo="org.apache.geronimo.tomcat.HostGBean" name="org.apache.geronimo.configs/tomcat/1.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat/1.2-SNAPSHOT/car,j2eeType=Host,name=TomcatVirtualHost_2">
<attribute name="className">org.apache.catalina.core.StandardHost</attribute>
<attribute name="initParams">name=virtualhost2.com
       appBase=
       workDir=work</attribute>
       <attribute name="aliases">virtualhost3.com,virtualhost4.com</attribute>
</gbean>
...

...

Code Block
xml
xml
borderStylesolid
titleconfig.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- ======================================================== -->
<!-- Warning - This XML file is re-generated by Geronimo when -->
<!-- changes are made to Geronimo's configuration, therefore  -->
<!-- any comments added to this file will be lost.            -->
<!-- Do not edit this file while Geronimo is running.         -->
<!-- ======================================================== -->
<attributes xmlns="http://geronimo.apache.org/xml/ns/attributes-1.1">
    <module name="org.apache.geronimo.configs/rmi-naming/1.2-SNAPSHOT/car">
        <gbean name="RMIRegistry">
            <attribute name="port">1099</attribute>
        </gbean>
        <gbean name="NamingProperties">
            <attribute name="namingProviderUrl">rmi://0.0.0.0:1099</attribute>
        </gbean>
        <gbean name="DownloadedPluginRepos">
            <attribute name="repositoryList">http://geronimo.apache.org/plugins/plugin-repository-list-1.2.txt</attribute>
            <attribute name="userRepositories">[]</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/j2ee-server/1.2-SNAPSHOT/car"/>
    <module name="org.apache.geronimo.configs/transaction/1.2-SNAPSHOT/car"/>
    <module name="org.apache.geronimo.configs/j2ee-security/1.2-SNAPSHOT/car">
        <gbean name="JaasLoginServiceRemotingServer">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">4242</attribute>
        </gbean>
        <gbean name="JMXService">
            <attribute name="protocol">rmi</attribute>
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">9999</attribute>
            <attribute name="urlPath">/jndi/rmi://0.0.0.0:1099/JMXConnector</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/axis/1.2-SNAPSHOT/car"/>
    <module name="org.apache.geronimo.configs/openejb/1.2-SNAPSHOT/car">
        <gbean name="EJBNetworkService">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">4201</attribute>
        </gbean>
    </module>
    <module load="false" name="org.apache.geronimo.configs/j2ee-corba-yoko/1.2-SNAPSHOT/car">
        <gbean name="NameServer">
            <attribute name="port">1050</attribute>
            <attribute name="host">localhost</attribute>
        </gbean>
    </module>
    <module load="false" name="org.apache.geronimo.configs/j2ee-corba-sun/1.2-SNAPSHOT/car">
        <gbean name="NameServer">
            <attribute name="port">1050</attribute>
            <attribute name="host">localhost</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/system-database/1.2-SNAPSHOT/car">
        <gbean name="DerbyNetwork">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">1527</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/activemq-broker/1.2-SNAPSHOT/car">
        <gbean name="ActiveMQ.tcp.default">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">61616</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/activemq/1.2-SNAPSHOT/car"/>
    <module name="org.apache.geronimo.configs/tomcat/1.2-SNAPSHOT/car">
    <!-- ================================================= -->
	<!--    First HostGBean TomcatVirtualHost_1 defined    -->
    <!-- ================================================= -->
	    <gbean gbeanInfo="org.apache.geronimo.tomcat.HostGBean" name="org.apache.geronimo.configs/tomcat/1.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat/1.2-SNAPSHOT/car,j2eeType=Host,name=TomcatVirtualHost_1">
            <attribute name="className">org.apache.catalina.core.StandardHost</attribute>
            <attribute name="initParams">name=virtualhost1.com
                appBase=
                workDir=work</attribute>
        </gbean>
    <!-- ================================================= -->
	<!--   Second HostGBean TomcatVirtualHost_2 defined    -->
    <!-- ================================================= -->
	    <gbean gbeanInfo="org.apache.geronimo.tomcat.HostGBean" name="org.apache.geronimo.configs/tomcat/1.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat/1.2-SNAPSHOT/car,j2eeType=Host,name=TomcatVirtualHost_2">
            <attribute name="className">org.apache.catalina.core.StandardHost</attribute>
            <attribute name="initParams">name=virtualhost2.com
                appBase=
                workDir=work</attribute>
            <attribute name="aliases">virtualhost3.com,virtualhost4.com</attribute>
        </gbean>
        <gbean name="TomcatResources"/>
        <gbean name="TomcatWebConnector">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">8080</attribute>
            <attribute name="redirectPort">8443</attribute>
        </gbean>
        <gbean name="TomcatAJPConnector">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">8009</attribute>
            <attribute name="redirectPort">8443</attribute>
        </gbean>
        <gbean name="TomcatWebSSLConnector">
            <attribute name="host">0.0.0.0</attribute>
            <attribute name="port">8443</attribute>
        </gbean>
        <gbean name="org.apache.geronimo.configs/tomcat/1.2-SNAPSHOT/car?ServiceModule=org.apache.geronimo.configs/tomcat/1.2-SNAPSHOT/car,j2eeType=GBean,name=TomcatWebContainer">
            <attribute name="catalinaHome">var/catalina</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/geronimo-gbean-deployer/1.2-SNAPSHOT/car"/>
    <module name="org.apache.geronimo.configs/j2ee-deployer/1.2-SNAPSHOT/car">
        <gbean name="WebBuilder">
            <attribute name="defaultNamespace">http://geronimo.apache.org/xml/ns/j2ee/web/tomcat-1.2</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/connector-deployer/1.2-SNAPSHOT/car"/>
    <module condition="java.is1_5" name="org.apache.geronimo.configs/persistence-jpa10-deployer/1.2-SNAPSHOT/car"/>
    <module name="org.apache.geronimo.configs/openejb-deployer/1.2-SNAPSHOT/car">
        <gbean name="EJBBuilder">
            <attribute name="listener">?name=TomcatWebContainer</attribute>
            <reference name="ServiceBuilders">
                <pattern>
                    <name>GBeanBuilder</name>
                </pattern>
                <pattern>
                    <name>PersistenceUnitBuilder</name>
                </pattern>
            </reference>
        </gbean>
    </module>
    <module load="false" name="org.apache.geronimo.configs/openejb-corba-deployer/1.2-SNAPSHOT/car"/>
    <module name="org.apache.geronimo.configs/client-deployer/1.2-SNAPSHOT/car"/>
    <module name="org.apache.geronimo.configs/axis-deployer/1.2-SNAPSHOT/car"/>
    <module load="false" name="org.apache.geronimo.configs/javamail/1.2-SNAPSHOT/car">
        <gbean name="SMTPTransport">
            <attribute name="host">localhost</attribute>
            <attribute name="port">25</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/sharedlib/1.2-SNAPSHOT/car">
        <gbean name="SharedLib">
            <attribute name="classesDirs">var/shared/classes</attribute>
            <attribute name="libDirs">var/shared/lib</attribute>
        </gbean>
    </module>
    <module name="org.apache.geronimo.configs/tomcat-deployer/1.2-SNAPSHOT/car"/>
    <module name="org.apache.geronimo.configs/welcome-tomcat/1.2-SNAPSHOT/car"/>
    <module name="org.apache.geronimo.configs/webconsole-tomcat/1.2-SNAPSHOT/car"/>
    <module load="false" name="org.apache.geronimo.configs/uddi-tomcat/1.2-SNAPSHOT/car"/>
    <module name="org.apache.geronimo.configs/remote-deploy-tomcat/1.2-SNAPSHOT/car"/>
    <module name="org.apache.geronimo.configs/hot-deployer/1.2-SNAPSHOT/car"/>
    <module load="false" name="org.apache.geronimo.configs/ca-helper-tomcat/1.2-SNAPSHOT/car"/>
</attributes>

Back to Top

...