How to use EPrints with HTTPS
This page is under development as part of the EPrints 3.4 manual. It may still contain content specific to earlier versions. |
Please note! This page was written for EPrints version 2 and may not apply to version 3.
Manual Sections | ||
|
Setting up HTTPS under EPrints 3.0.5+/3.1
EPrints 3.0.5 (or EPrints 3.1) introduces a revised process for using EPrints under HTTPS. These instructions apply to users setting up a new repository - existing repositories will have old (incompatible) templates.
Configuration
Edit archives/[repoid]/cfg/cfg.d/10_core.pl. It will probably look like this:
$c->{host} = 'yomiko.ecs.soton.ac.uk'; $c->{port} = 8080; $c->{aliases} = []; #$c->{securehost} = 'yomiko.ecs.soton.ac.uk'; #$c->{secureport} = 8083; #$c->{securepath} = '/secure';
Add to the end of this file the following settings:
$c->{securehost} = 'HOSTNAME'; #$c->{secureport} = 'PORT';
$c->{http_root} = ""; $c->{https_root} = '/secure'; $c->{http_cgiroot} = '/cgi'; $c->{https_cgiroot} = '/secure/cgi';
Where HOSTNAME is the hostname of your HTTPS server. If your HTTPS server is not using the standard port 443 specify it here. The http(s)_(cgi)root variables specify the path to EPrints on your HTTP and HTTPS servers.
Now run bin/generate_apacheconf to generate the secure Apache configuration and copy the default template to the template used for HTTPS.
Add the following line inside your Apache SSL virtual host declaration (probably in /etc/httpd/conf.d/mod_ssl.conf):
Include /opt/eprints3/archives/[repoid]/var/auto-secure.conf
Restart Apache.