Maintenance

  • Home
  • Log in
  • « Multiple eXists side-by-side on subdomains with apache
  • Nougat on tablet »

Setting up and testing Jetty/Apache config for Peach

Posted by mholmes on 07 Mar 2017 in Servers, R & D, Activity log, Activity log, Documentation

This has been a relatively long process to figure out how best to configure a Jetty/eXist instance to run happily alongside others, on a test domain, and how to test that setup. This is what I've done:

  • Install apache locally from the repos.
  • Install mod_jk from the repos.
  • Turn on SSL (sudo a2enmod ssl) and set up a self-signed cert (lots of docs on this available).
  • Set up test domains in the local hosts file:
    127.0.0.1	localhost
    127.0.1.1	spud
    127.0.2.1	test-internal.hcmc.uvic.ca
    127.0.3.1	moeml-internal.hcmc.uvic.ca
    
  • Set up virtual domains in Apache -- example sites-enabled/test.conf:
    <VirtualHost 127.0.2.1:80>
    	ServerAdmin webmaster@localhost
    	ServerName test-internal.hcmc.uvic.ca
    	ServerAlias test
    	ProxyRequests Off
    	<Proxy *>
    		Order deny,allow
    		Allow from all
    	</Proxy>
    	ProxyPreserveHost on
    	ProxyPass / http://test-internal.hcmc.uvic.ca:8080/ nocanon
            ProxyPassReverse / http://test-internal.hcmc.uvic.ca:8080
            AllowEncodedSlashes NoDecode
    </VirtualHost>
    
    <VirtualHost 127.0.2.1:443>
            ServerAdmin webmaster@localhost
            ServerName test-internal.hcmc.uvic.ca
            ServerAlias test
            SSLEngine on
            SSLCertificateFile /etc/ssl/certs/spud.crt
            SSLCertificateKeyFile /etc/ssl/private/spud.key
            ProxyRequests Off
            <Proxy *>
                    Order deny,allow
                    Allow from all
            </Proxy>
            ProxyPreserveHost on
            ProxyPass / http://test-internal.hcmc.uvic.ca:8080/ nocanon
            ProxyPassReverse / http://test-internal.hcmc.uvic.ca:8080
            AllowEncodedSlashes NoDecode
    </VirtualHost>
    
  • In these four files in the Jetty instance:
    tools/jetty/etc/jetty-http.xml
    tools/jetty/etc/jetty-ssl.xml
    tools/jetty/etc/standalone-jetty-http.xml
    tools/jetty/etc/standalone-jetty-ssl.xml
    
    change the <Set name="host"> to <Set name="host">test-internal.hcmc.uvic.ca</Set>. (I think only the first two matter for our purposes, but it does no harm to change the others.)
  • Start the Jetty instance, and restart apache. Access the jetty app on test-internal.hcmc.uvic.ca.

I still have to test this with a second Jetty running side-by-side on a different domain; I'll do that tomorrow.

This entry was posted by Martin and filed under Servers, R & D, Activity log, Activity log, Documentation.

Maintenance

This blog is the location for all work involving software and hardware maintenance, updates, installs, etc., both routine and urgent.
  • Home
  • Recently
  • Archives
  • Categories

Search

Categories

  • All
  • Announcements
  • Hit by a bus
  • Labs
    • Activity log
    • Documentation
  • Notes
  • R & D
    • Activity log
    • Documentation
  • Servers
    • Activity log
    • Documentation
  • Tasks

All blogs

  • Academic
  • AdaptiveDB
  • Admin
  • Announcements
  • CanMys
  • Cascade
  • CGWP
  • ColDesp
  • Depts
  • DVPP
  • Endings
  • HCMC Blogs
  • Landscapes
  • LEMDO
  • Linguistics
  • Maint
  • LondonMap
  • Mariage
  • MoM
  • Moses
  • Pro-D
  • Projects
  • ScanCan
  • HumsSites
  • Wendat

This collection ©2023 by admin • Help • Multiple blogs done right!