Changes between Initial Version and Version 1 of HowToRunMultipleGeonetworkInstancesUnderJetty


Ignore:
Timestamp:
Dec 2, 2010, 5:27:27 AM (13 years ago)
Author:
justinrowles
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowToRunMultipleGeonetworkInstancesUnderJetty

    v1 v1  
     1There is no getting past the fact that the public context must be the same as the local context at present. 
     2
     3This is how you change your local context to match whatever you want for your public one.
     4
     5There are two addLifeCycle elements in jetty.xml.  You will want to uncomment the one which is currently commented out, and comment out the one which isn’t.  Make sure you take care of the comment lines inside the section you need to comment out.
     6
     7You will need to create a contexts directory in the jetty directory.
     8
     9Populate the addLifeCycle xml element and the contexts/geonetwork.xml file by following (VERY CAREFULLY!) the instructions on this page: http://docs.codehaus.org/display/JETTY/ContextDeployer
     10
     11__Worked example__
     12
     13I have two branded geonetwork installs (based on 2.6.0 and 2.6.1) running on localhost 8080 and 8081, which I want to be visible at /261/xmleditor and /260/xmleditor:
     14
     15My geonetwork.xml in my geonetwork.2.6.1 install is as follows.  There is a very similar(!) one in my 2.6.0 install:
     16
     17<?xml version="1.0"  encoding="ISO-8859-1"?>
     18<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN" "http://jetty.mortbay.org/configure.dtd">
     19<Configure class="org.mortbay.jetty.webapp.WebAppContext">
     20  <Set name="contextPath">/261/xmleditor</Set>
     21  <Set name="war"><SystemProperty name="jetty.home" default="."/>/../web/geonetwork/</Set>
     22</Configure>
     23
     24In Apache's ProxyPass and ProxyPassReverse settings, make your localhost context the same as your public context. 
     25
     26ProxyPass /261/xmleditor http://localhost:8080/261/xmleditor
     27ProxyPassReverse /261/xmleditor http://localhost:8080/261/xmleditor
     28
     29ProxyPass /260/xmleditor http://localhost:8081/260/xmleditor
     30ProxyPassReverse /260/xmleditor http://localhost:8081/260/xmleditor
     31
     32
     33I have added –Djetty.port=8080 (or 8081 for the other one) to the java line in bin/start-geonetwork.sh
     34
     35I now start both processes with their respective bin/start-geonetwork.sh files, count to ten and restart httpd.
     36
     37If it doesn’t all work, then read the jetty/logs/output.log and apache log for clues ;-)