Apachevhost.conf
EPrints 3 Reference: Directory Structure - Metadata Fields - Repository Configuration - XML Config Files - XML Export Format - EPrints data structure - Core API - Data Objects
apachevhost.conf is intended for adding additional Apache configuration if you need to add non-EPrints parts under you repository archive's hostname. Such as How to add a subdirectory that runs PHP scripts. If this file is required it should be placed directly under the archive's cfg sub-directory, (i.e. EPRINTS_PATH/archives/ARCHIVE_NAME/cfg/). One reason for having this file may be to redirect certain requests off to other websites. Doing this in Apache configuration is much more efficient that writing bespoke code for EPrints to perform these redirects. Here is an example of some Apache configuration for doing redirects:
RewriteEngine on RewriteRule "^/journal/till/?$" "https://www.teachinginlifelonglearning.org.uk/" [R,L] RewriteRule "^/journal/bjpharm/?$" "https://www.bjpharm.org.uk/" [R,L] RewriteRule "^/journal/jpm/?$" "https://www.journalofperformancemagic.org.uk/" [R,L]
If you are adding rewrites for apachevhost.conf you have need to also add these to securevhost.conf if you have HTTPS setup for your repository archive.
apachevhost.conf may have been automatically created if your originally installed you repository archive on an older version of EPrints. If you to have to create this file be sure to run the following command so that is linked into the rest of your Apache configuration be reloading the web server.
EPRINTS_PATH/bin/generate_apacheconf --system --replace