Title: Host and port configuration Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at . http://www.apache.org/licenses/LICENSE-2.0 . Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. The default configuration uses the following URL's: * Portal: [http://localhost:8080/portal][4] * Base URL for rendering OpenSocial gadgets http://localhost:8080/gadgets ## Override portal configuration First configure the portal to call a different URL for the OpenSocial engine: * Make a copy of [portal.properties][1] * Change the properties `portal.opensocial_engine.protocol`, `portal.opensocial_engine.root` and/or `portal.opensocial_engine.gadget_path` * Set a system property `portal.override.properties` that points to the location of the custom properties file. * File system: `portal.override.properties=/new/location/of/myportal.properties` * Classpath: `portal.override.properties=classpath:myportal.properties` After a (re)start of Tomcat, the portal will now try to fetch gadget rendering data from your configured location. ## Override OpenSocial engine configuration * Make a copy of [container.js][2] (check if this version is still valid for your release) * Make a copy of [rave.shindig.properties][6] * Change the reference in `rave.shindig.properties` to `container.js`: `shindig.containers.default=/new/location/of/container.js` * Change the properties that point to localhost, port 8080 or http * Set a system property `rave-shindig.override.properties` that points to the location of the custom properties file. * File system: `rave-shindig.override.properties=/new/location/of/myrave-shindig.properties` * Classpath: `rave-shindig.override.properties=classpath:myrave-shindig.properties` Note: Although `shindig.host`, `shindig.port` and `shindig.contextroot` can also be overridden by setting them as individual system properties, `container.js` contains hard coded values with `localhost` ## Setting the system properties ### Running Cargo The Cargo Maven plugin is configured in `rave-portal/pom.xml`. Go to the element `systemProperties` and enable the elements `portal.override.properties` and `rave-shindig.override.properties` (also modify its paths). true /path/to/custom.portal.properties /path/to/custom.shindig.properties ### Running a stand alone Tomcat server A common location to set the system properties is in tomcat/bin/setenv.sh. Add a variable `RAVE_OPTS` RAVE_OPTS="-Dportal.override.properties=/path/to/custom.portal.properties -Drave-shindig.override.properties=/path/to/custom.rave.shindig.properties" Then add it to the `CATALINA_OPTS` variable CATALINA_OPTS="${CATALINA_OPTS} ${RAVE_OPTS}" [4]: http://localhost:8080/portal [1]: http://svn.apache.org/repos/asf/rave/trunk/rave-portal-resources/src/main/resources/portal.properties [2]: http://svn.apache.org/repos/asf/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-server/rave-shindig-resources/src/main/webapp/WEB-INF/classes/containers/default/container.js [5]: http://svn.apache.org/repos/asf/rave/trunk/rave-portal/pom.xml [6]: http://svn.apache.org/repos/asf/rave/trunk/rave-providers/rave-opensocial-provider/rave-opensocial-server/rave-shindig-resources/src/main/resources/rave.shindig.properties