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

Both sides previous revisionPrevious revision
Next revision
Previous revision
en:user_advanced:gs3_server [2025/06/27 01:36] – [Changing Tomcat settings] kjdonen:user_advanced:gs3_server [2025/06/27 03:00] (current) – [Proxying Tomcat with Apache] kjdon
Line 92: Line 92:
 </code> </code>
  
 +==== Turn off localhost access logs ====
  
 +By default, one of the enabled forms of logging in Apache Tomcat is the Local Host Access Log.  This log tracks every connection made to the server. This can add up to a lot of logs that can quickly overwhelm the hard drive space of your server. 
 +
 +To disable this, edit resources/tomcat/server_tomcat8.xml.in
 +
 +Look for the ''<Valve className="org.apache.catalina.valves.AccessLogValve".../>'' section and comment it out by surrounding it in ''<nowiki><!--  --></nowiki>''
  
 ===== Changing collections or services ===== ===== Changing collections or services =====
Line 104: Line 110:
 Tomcat uses a Manager to handle HTTP session information. The Manager is specified in a <Manager> element in the greenstone3.xml context file. By default, Greenstone uses the standard Tomcat default manager. Tomcat uses a Manager to handle HTTP session information. The Manager is specified in a <Manager> element in the greenstone3.xml context file. By default, Greenstone uses the standard Tomcat default manager.
  
-Session information is stored between normal stop and starts in $GSDL3SRCHOME/packages/tomcat/work/Catalina/localhost/greenstone3/SESSIONS.ser. To disable storing session info between restarts, set the pathname attribute of the Manager element to "" in $GSDL3SRCHOME/resources/tomcat/greenstone3.xml.+Session information is stored between normal stop and starts in $GSDL3SRCHOME/packages/tomcat/work/Catalina/localhost/greenstone3/SESSIONS.ser. To disable storing session info between restarts, set the pathname attribute of the Manager element to "" in $GSDL3SRCHOME/resources/tomcat/greenstone3.xml.in.
  
 To manually clear saved session info, stop Tomcat and delete the SESSIONS.ser file. To manually clear saved session info, stop Tomcat and delete the SESSIONS.ser file.
Line 120: Line 126:
 ServerName www.greenstone.org ServerName www.greenstone.org
 ... ...
-ProxyPass /greenstone3 http://puka.cs.waikato.ac.nz:8080/greenstone3 + 
-ProxyPassReverse /greenstone3 http://puka.cs.waikato.ac.nz:8080/greenstone3+Redirect /greenstone3 /greenstone3/ 
 +ProxyPass /webswing-server/ http://puka.cs.waikato.ac.nz:8383/webswing-server/ upgrade=websocket 
 +ProxyPass /greenstone3http://puka.cs.waikato.ac.nz:8080/greenstone3 
 +ProxyPassReverse /greenstone3http://puka.cs.waikato.ac.nz:8080/greenstone3 
 +<Location /greenstone3> 
 +          ProxyPassReverseCookiePath /greenstone3 /greenstone3 
 +</Location>
 </VirtualHost> </VirtualHost>
 </code> </code>
 +
 +Restart Apache for these changes to take effect.
  
 In our example, the Greenstone3 servlet can be accessed at  In our example, the Greenstone3 servlet can be accessed at 
Line 129: Line 143:
 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  +You will also need to tell Greenstone itself about the new web address. Edit **build.properties**. 
-**web/sites/localsite/siteConfig.xml**. Add a line like the following to the <metadataList>:+Set the revproxy fields:
 <code> <code>
-<metadata name="siteURL">http://www.greenstone.org/greenstone3/</metadata>+revproxy.protocol=https 
 +revproxy.domain=www.greenstone.org 
 +##revproxy.opt_port=8383 
 +##revproxy.context=greenstone3
 </code> </code>
  
- +You will also need to edit **resources/web/servlets.xml.in** 
-Set up the tomcat.port and shutdown port in your ''build.properties'' file if different from the default 8383 and 8305 respectively. +Uncomment and set the servlet_url_prefix param:
- +
-Also edit these files ton contain the new url-prefix (if different from /greenstone3):+
 <code> <code>
- ./resources/web/global.properties.in +<init-param> 
- ./resources/web/global.properties+   <param-name>servlet_url_prefix</param-name> 
 +   <param-value>//www.greenstone.org/greenstone3/</param-value> 
 +</init-param>
 </code> </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: +You will need to restart Tomcat for these settings to take effect.
-<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. 
en/user_advanced/gs3_server.1750988214.txt.gz · Last modified: 2025/06/27 01:36 by kjdon