Difference between revisions of "Legacy HTTPS Only Configuration"

From EPrints Documentation
Jump to: navigation, search
(Added full instructions, potential issues and side effects.)
m
 
Line 7: Line 7:
 
  </Location>
 
  </Location>
 
Substitute <tt>example.eprints.org</tt> with the hostname for your EPrints repository.
 
Substitute <tt>example.eprints.org</tt> with the hostname for your EPrints repository.
 +
  
 
2. Run the following command to regenerate the Apache webserver configuration 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
 
  EPRINTS_PATH/bin/generate_apacheconf --system --replace
 +
  
 
3. Reload the Apache webserver:
 
3. Reload the Apache webserver:
 
  apachectl graceful
 
  apachectl graceful
 +
  
 
4. Test that you web browser now automatically redirects by going to the HTTP page (e.g. http://example.eprints.org/view/)
 
4. Test that you web browser now automatically redirects by going to the HTTP page (e.g. http://example.eprints.org/view/)
Line 18: Line 21:
 
== Potential Issues ==
 
== Potential Issues ==
 
1. If you change you primary hostname (i.e. what is set in <tt>$c->{host}</tt> in your archive's <tt>cfg/cfg.d/10_core.pl</tt> you will need to make sure you update <tt>apachevhost.conf</tt> as well.
 
1. If you change you primary hostname (i.e. what is set in <tt>$c->{host}</tt> in your archive's <tt>cfg/cfg.d/10_core.pl</tt> you will need to make sure you update <tt>apachevhost.conf</tt> as well.
 +
  
 
2. If you already have a complex <tt>apachevhost.conf</tt> 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.
 
2. If you already have a complex <tt>apachevhost.conf</tt> 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.

Latest revision as of 09:07, 20 May 2022

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.

Instructions

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/
</Location>

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.