Apache TLS/SSL reverse proxy
Table of Contents
About Apache HTTP Server
Using the Apache HTTP Server in front of CollectionSpace's Tomcat Server instance has many advantages, including port hiding and supporting TLS/SSL connections.
Port Hiding
Port hiding is useful for creating a URL for CollectionSpace that does not have the :8180
port number. For example, a CollectionSpace tenant can be available to users at cspace.mymuseum.org
, instead of the harder to remember cspace.mymuseum.org:8180/cspace/tenantname
.
TLS/SSL
TLS/SSL are cryptographic protocols that provide communications security over the Internet. Configuring CollectionSpace to communicate this way with users is critical to protecting collection data and user information in a production instance.
Instructions for installing on Ubuntu 20.04 LTS
Installing Apache as a reverse proxy to Tomcat
Install the Apache HTTP Server:
|
Create a virtual host for your CollectionSpace instance.
Enable the proxy
and proxy_http
modules.
|
Add the following lines to your virtual host configuration file:
|
Restart apache.
|
CollectionSpace should now be accessible on your virtual host, without a port number. For example, if your virtual host's domain is cspace.mymuseum.org
, the core
tenant should be available at http://cspace.mymuseum.org/cspace/core
.
Enabling SSL/TLS
To enable TLS, you must have a certificate for your domain. If you don't have a certificate, you can obtain one from Let's Encrypt.
Enable the ssl module.
|
Edit your virtual host configuration file. Change the port number of the configuration to 443
instead of 80
, and add the SSL configuration settings shown below.
|
Restart apache.
|
CollectionSpace should now be accessible using an https URL, like https://cspace.mymuseum.org/cspace/core.
In your virtual host configuration file, add configuration to redirect http URLs to https.
|
Restart apache.
|
Attempting to access CollectionSpace using an http URL, like http://cspace.mymuseum.org/cspace/core
, should now force the browser to access CollectionSpace using https, e.g. at https://cspace.mymuseum.org/cspace/core
.