User Tools

Site Tools


en:user_advanced:gs3_server

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revisionBoth sides next revision
en:user_advanced:gs3_server [2016/11/16 20:33] – created kjdonen:user_advanced:gs3_server [2018/07/23 05:58] – [Proxying Tomcat with Apache] anupama
Line 5: Line 5:
 Tomcat is a servlet container, and Greenstone3 runs as a servlet inside it.  Tomcat is a servlet container, and Greenstone3 runs as a servlet inside it. 
 The file ''$GSDL3SRCHOME/packages/tomcat/conf/server.xml'' is the Tomcat configuration file.  The file ''$GSDL3SRCHOME/packages/tomcat/conf/server.xml'' is the Tomcat configuration file. 
 +
 A Tomcat Context represents a web application. The Context for Greenstone3 is given by the file A Tomcat Context represents a web application. The Context for Greenstone3 is given by the file
 $GSDL3SRCHOME/packages/tomcat/conf/Catalina/localhost/greenstone3.xml.  $GSDL3SRCHOME/packages/tomcat/conf/Catalina/localhost/greenstone3.xml. 
-This tells Tomcat where to find the files for the application including its web.xml file (in the $GSDL3HOME folder, ie the web folder in your greenstone3 installation) , and what URL (/greenstone3) to give it. To make changes to these files, see the section on changing Tomcat settings [[#Changing_Tomcat_settings|below]].+This tells Tomcat where to find the files for the application including its web.xml file (in the $GSDL3HOME folder, ie the web folder in your greenstone3 installation) , and what URL (/greenstone3) to give it.  
 + 
 +To make changes to these files, don't edit these files directly as Greenstone configures these each time it starts up. See the section on changing Tomcat settings [[#Changing_Tomcat_settings|below]]. 
 Anything inside the Context directory is accessible via Tomcat . For example, the index.html  Anything inside the Context directory is accessible via Tomcat . For example, the index.html 
 file that lives in $GSDL3HOME can be accessed through the URL file that lives in $GSDL3HOME can be accessed through the URL
Line 15: Line 19:
 ==== Starting and Stopping Tomcat ==== ==== Starting and Stopping Tomcat ====
  
-Greenstone provides a little server program which will start the Tomcat server and open the library in a browser. See the [[en:greenstone_server|Greenstone Server]] page in the Beginner's Guide.+Greenstone provides a little server program which will start the Tomcat server and open the library in a browser. See the [[en:user:greenstone_server|Greenstone Server]] page in the User's Guide.
 Alternatively, you can use Ant to stop and start Tomcat. Run these commands from the main Greenstone3 installation directory ($GSDL3SRCHOME). Alternatively, you can use Ant to stop and start Tomcat. Run these commands from the main Greenstone3 installation directory ($GSDL3SRCHOME).
  
Line 95: Line 99:
 http://puka.cs.waikato.ac.nz:8080/greenstone3/library, which is not publicly accessible. http://puka.cs.waikato.ac.nz:8080/greenstone3/library, which is not publicly accessible.
  
 +You will also need to tell Greenstone itself about the new web address. Edit 
 +**web/sites/localsite/siteConfig.xml**. Add a line like the following to the <metadataList>:
 +<code>
 +<metadata name="siteURL">http://www.greenstone.org/greenstone3/</metadata>
 +</code>
 +
 +
 +Set up the tomcat.port and shutdown port in your ''build.properties'' file if different from the default 8383 and 8305 respectively.
 +
 +Also edit these files ton contain the new url-prefix (if different from /greenstone3):
 +<code>
 + ./resources/web/global.properties.in
 + ./resources/web/global.properties
 +</code>
 +to change 
 +<code>[email protected]@</code>
 +to
 +<code>
 + #[email protected]@
 + tomcat.context=urban-narrative-greenstone3
 +</code>
 +
 +Don't forget to run (from GS3 folder):
 +<code>
 + ant configure-web
 +</code>
 +to regenerate the global.properties file in the actual web folder.
 +
 +Finally, to get everything running:
 +</code>
 +./gs3-setup.sh
 +ant start
 +<code>
 +Then
 +<code>ssh [email protected] (e.g. puka)</code>
 +In the same x-term, ssh -L back into the machine running the GS3 server:
 +<code>puka$ ssh -L port:localhost:port (you@)gs3-server.machine.domain</code>
 +
 +On any browser, visit:
 +<code>remote.public.machine/url-prefix/library</code>
 === Running Tomcat behind a proxy === === Running Tomcat behind a proxy ===
 Almost everything works fine when Tomcat is running behind a proxy.  Almost everything works fine when Tomcat is running behind a proxy. 
Line 116: Line 160:
 <code>$ ant stop</code> <code>$ ant stop</code>
 Then, deploy  Then, deploy 
-(as written in the [[http://www.greenstone.org/docs/greenstone3/manual.pdf|Greenstone 3 manual]], p. 5):+(as written in the [[http://files.greenstone.org/technical/gs3manual.pdf|Greenstone 3 manual]], p. 5):
 <code>$ ant deploy-localsite</code> <code>$ ant deploy-localsite</code>
 Check that it works, by **starting** tomcat again and going to: Check that it works, by **starting** tomcat again and going to:
Line 122: Line 166:
 Make sure that the page appears. You can also look at the wsdl file for the gs3 web service that's been exposed:  Make sure that the page appears. You can also look at the wsdl file for the gs3 web service that's been exposed: 
 <code>http://localhost:8080/greenstone3/services/localsite?wsdl</code> <code>http://localhost:8080/greenstone3/services/localsite?wsdl</code>
-You can also deploy other sites, see the [[http://www.greenstone.org/docs/greenstone3/manual.pdf|Greenstone 3 Developer's Manual]].+You can also deploy other sites, see the [[http://files.greenstone.org/technical/gs3manual.pdf|Greenstone 3 Developer's Manual]].
  
  
en/user_advanced/gs3_server.txt · Last modified: 2023/03/13 01:46 by 127.0.0.1