Old Release

This documentation relates to an old version of VIVO, version 1.11.x.
Looking for another version? See all documentation.

Most sites choose to configure their VIVO system with an Apache HTTPD web server to accept requests and then proxy them to the VIVO Tomcat context. This will make Vitro available at http://example.com instead of http://example.com:8080/vitro. It will also allow the use of external authentication.

Setup HTTPD to send all of the requests that it receives to Tomcat's AJP connector. This can be done in HTTPD 2.x with a simple directive in httpd.conf:

ProxyPass / ajp://localhost:8009/


There are at least 2 ways to do this, along with a 3rd method that hasn't been documented yet.

  1. In the tomcat webapps directory, create a symbolic link called ROOT to vivo. This will redirect all requests to root to the vivo application.

    cd /usr/local/tomcat/webapps
    rm -rf ROOT
    ln -s vivo ROOT
    ls -latr
    ROOT -> vivo

  2. Modify the <Host> in Tomcat server.xml (located in [tomcat root]/conf/) so that the context path is empty to allow VIVO to be served from the root path. Locate the <Host name="localhost"...> directive and update as follows:

<Host name="localhost" appBase="webapps"
        unpackWARs="true" autoDeploy="false"
        xmlValidation="false" xmlNamespaceAware="false">
        <Context path=""
                cookies="true" >
            <Manager pathname="" />

After setting up the above, it is recommended that you modify the Tomcat AJP connector parameters in server.xml. Look for the <connector> directive and add the following properties:

    connectionTimeout="20000" maxThreads="320" keepAliveTimeout="20000"

Note: the value for maxThreads (320) is equal or greater than the value for MaxClients in the apache's httpd.conf file.

3. in the tomcat/conf directory - create a ROOT.xml with the context element as stated above. This was suggested, but somebody needs to verify and complete this document.

  • No labels

1 Comment

  1. This is what my ROOT.xml looks like

    <Context path="" docBase="/vivo/webapps/vivo" reloadable="true" cookies="true">
       <Environment type="java.lang.String" name="vitro/home" value="/vivo/home" override="true" />
       <Manager pathname="" />

    The file location depends on how Tomcat was installed. On my machine, ROOT.xml is located in /etc/tomcat/Catalina/localhost. 

    My webapps directory lives outside Tomcat (docbase above). I believe I do this because Tomcat by default loads all the webapps in its own webapps directory, then loads the additional Contexts you have set. The result is, VIVO is loaded twice if you keep it in the Tomcat/webapps directory. The ProxyPass ajp connector also needs to be set in Apache.