How to use EPrints with HTTPS

From EPrints Documentation
Revision as of 16:39, 7 April 2008 by Tdb01r (talk | contribs)
Jump to: navigation, search
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.


Edit archives/[repoid]/cfg/cfg.d/ It will probably look like this:

$c->{host} = '';
$c->{port} = 8080;
$c->{aliases} = [];
#$c->{securehost} = '';
#$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.