Legacy HTTPS Only Configuration

From EPrints Documentation
Jump to: navigation, search

These instructions on this page assume that HTTPS configuration is already deployed on your EPrints repository. This is how you can deploy HTTPS only configuration with HTTP to HTTPS redirects of EPrints repositories earlier that version 3.4.1.


1. Create a file under the cfg/ directory of you archive called apachevhost.conf (i.e. EPRINTS_PATH/archives/ARCHIVEID/cfg/apachevhost.conf) If it already exists at the following configuration at the top of the file.

<Location />
    Redirect / https://example.eprints.org/

Substitute example.eprints.org with the hostname for your EPrints repository.

2. Run the following command to regenerate the Apache webserver configuration for your EPrints repository:

EPRINTS_PATH/bin/generate_apacheconf --system --replace

3. Reload the Apache webserver:

apachectl graceful

4. Test that you web browser now automatically redirects by going to the HTTP page (e.g. http://example.eprints.org/view/)

Potential Issues

1. If you change you primary hostname (i.e. what is set in $c->{host} in your archive's cfg/cfg.d/10_core.pl you will need to make sure you update apachevhost.conf as well.

2. If you already have a complex apachevhost.conf the configuration you need to add may not be compatible. In theory you should be able to strip out all configuration in this file and just replace it with the configuration in step one of the above instructions. However, there may be scenarios where this would not be appropriate. So take care in any changes you make.

Side effects of switching to HTTPS only =

[Simplified_HTTPS_Configuration#Issues_and_Troubleshooting|Here] are some of the potential side effects you may face if you are switching your EPrints repository to HTTPS only (with HTTP to HTTPS redirects. If you are creating a new repository that will start out being HTTPS only, all these side-effects should be negated.