Jump to content
Wiki Home
EPrints Home
Bazaar
Files
Main menu
Main menu
move to sidebar
hide
Navigation
Front Page
EPrints 3 Manual
EPrints Training Course
EPrints Glossary
Installing EPrints
How-to Configure EPrints
EPrints 3.2+ API
EPrints 3 Reference
EPrints Plugins
Wiki
All categories
Recent changes
Main Page
Help
EPrints Documentation
Search
Search
Appearance
Log in
Request account
Personal tools
Log in
Request account
Pages for logged out editors
learn more
Contributions
Talk
Editing
EPrints 3.4.3
(section)
Page
Discussion
British English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Configuration for URLs and Paths === EPrints has various configuration settings for URLs and paths that are automatically configured based on the settings in an archive's <code>cfg/cfg.d/10_core.pl</code>. The six most significant are the following: ; <code>http_url</code> : The HTTP version of the URL (e.g. ''http://example.eprints.org''). Since EPrints 3.4.1, this will be set to the same as <code>https_url</code> if <code>$c->{host}</code> is undefined in the archive's ''cfg/cfg.d/10_core.pl''. ; <code>https_url</code> : The HTTPS version of the URL (e.g. ''https://example.eprints.org''). If <code>$c->{securehost}</code> is not defined in the archive's <code>cfg/cfg.d/</code> directory (typically in <code>10_core.pl</code> or <code>https.pl</code>) then the URL will be set to HTTP (e.g. ''http://example.eprints.org'') ; <code>base_url</code> : This is set to <code>http_url</code> or https_url</code> depending on whether <code>$c->{securehost}</code> is defined. ; <code>http_root</code> : The HTTP version of the root path. Typically this will an empty string unless EPrints needs to run under its own path (e.g. ''http://example.eprints.org/eprints'' will need the <code>http_root</code> set to <code>/eprints</code>). ; <code>https_root</code> : The HTTPS version of the root path. Typically this will be empty string unless EPrints needs to run under its own path (e.g. ''https://example.eprints.org/eprints'' will need the <code>https_root</code> set to ''/eprints''). ; <code>rel_path</code> : Like <code>base_url</code> this is the same as the <code>http_root</code> or <code>https_root</code> dependent on whether <code>$c->{securehost}</code> is defined. Each of the six configuration settings above have their sister configuration settings for their CGI URLs or paths: {| class="wikitable" |- ! Setting ! Example ! CGI Setting ! CGI Example |- | http_url | http://example.eprints.org | http_cgiurl | http://example.eprints.org/cgi |- | https_url | https://example.eprints.org | https_cgiurl | https://example.eprints.org/cgi |- | base_url | https://example.eprints.org | perl_url | https://example.eprints.org/cgi |- | http_root | | http_cgiroot | /cgi |- | https_root | | https_cgiroot | /cgi |- | rel_path | | rel_cgipath | /cgi |} Over time there has been a move from EPrints repositories being HTTP-only to HTTP and HTTPS and further towards HTTPS only (with HTTP redirects). EPrints configuration has had to evolve over time to support all these use cases, so those running EPrints can (continue to) run the HTTP/HTTPS setup that works for them. (Although, the recommendation would be to use the most secure configuration available). However, this has led to inconsistent use of the twelve configuration settings for URLs and paths described above. Therefore, EPrints 3.4.3 has attempted to tidy up much of this. The use of <code>http_url</code>, <code>https_url</code>, <code>http_cgiurl</code> and <code>https_cgiurl</code> is unnecessary, when <code>base_url</code> and <code>perl_url</code> by default will consistently provide the most secure available option. (The only case where there may be issue is for URIs representing eprint items. Where changing the repository setup should not change permanent URIs. For this the recently introduced <code>uri_url</code> configuration option can be used). Using <code>base_url</code> and <code>perl_url</code> consistently also ensure that there is not switching between the use of HTTPS and HTTP. In particular, this helps avoid problems with the web browser reporting mixed content warnings (e.g. HTTP images on HTTPS pages) and warnings when forms are submitted to an HTTP URL and the current page is HTTPS. Using a full URL (with a protcol and hostname) is excessive in most cases and therefore <code>rel_path</code> and <code>rel_cgipath</code> should be the preferred options. However, there are a number of situations where this would not be appropriate, as the URL may be used outside the scope of the EPrint repository: # In export formats for eprint items # In citations for eprint items # In generated email messages # Links in the web page head to related alternate resources of services independent of the web page (i.e. to export formats, API services but not CSS, JavaScript, favicons, etc.). For all these scenarios not using a full URLs might prevent the resource being accessed once the content has been exported, embedded, emailed or consumed by a user or third-party application. The use of <code>http_root</code>, <code>https_root</code>, <code>http_cgiroot</code> and <code>https_cgiroot</code> is also unnecessary, when <code>rel_path</code> and <code>rel_cgipath</code> are available. Except when being used to define other URL and path configuration settings or (with <code>http_url</code>) generating Apache configuration (using ''bin/generate_apacheconf''). ==== Summary of Changes ==== * All existing URL and path configuration settings have been retained to ensure existing plugins and bespoke code continue to function. * Eliminated use of <code>http_url</code> (except in Apache configuration generation), <code>https_url</code>, <code>http_cgiurl</code> and <code>https_cgiurl</code>. * Used <code>base_url</code> and <code>perl_url</code> for links related to user-generated content (i.e. eprint summary/abstract pages, document download URLs, document preview images/thumbnails, etc.), links defined in the head of a web page that are not directly related to the generation of the page (i.e. everything but CSS stylesheets, JavaScript and favicons) and links that are rendered as text on a web page. * Used <code>rel_path</code> and <code>rel_cgipath</code> for all other purposes where it is unnecessary to use <code>base_url</code> or <code>perl_url</code>. * Eliminated use of <code>http_cgiroot</code> and <code>https_cgiroot</code> and limited use of <code>http_root</code> and <code>https_root</code> to Apache configuration generation and in defining other configuration settings. * Ensured <code>rel_path</code> and <code>rel_cgipath</code> are used for links in templates, static pages and other places where previously no URL/path configuration setting was used. To ensure these links work when EPrints is not running on the root path (i.e. <code>rel_path</code> is not an empty string).
Summary:
Please note that all contributions to EPrints Documentation may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
EPrints Documentation:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)