Creating a new virtual host
This page describes how to create a new Elentra vhost instance locally, in order to avoid switching versions in the same vhost (and the mayhem that typically ensues)
Creating a separate virtual host (vhost), with its own clone of the elentra-1x-me
repository, and its own database, can be very useful because it allows you to keep the same version (e.g. release/1.26
), without needing to switch between versions when you need to work on a different Elentra version.
By setting up additional vhosts, you can have local Elentra instances for multiple versions of Elentra, for example your institution's branded edition and the consortium version, or previously-supported releases.
For the purposes of this example, we will suppose that you are creating a new vhost called uni-elentra.localhost
, i.e. which you would access using http://uni-elentra.localhost/.
Steps
Change to the
elentra-developer
directory:Create a new Apache configuration file for the new vhost:
Modify the new
resources/vhosts/uni-elentra.localhost.conf
file to use a different source code path and hostname, for example the following:If your new instance will run a version of Elentra ME that uses an older version of PHP (e.g. 7.4), then you may want to hard code the the version of the PHP in the sock file used. This way, you won't have to manually switch PHP versions when developing on multiple versions at the same time:
For the new changes to take effect, restart the docker container:
Add an entry to the
/etc/hosts
file for the new vhost:Clone the
elentra-1x-me
andelentra-1x-api
repositories from your remote, for example:Set up the composer dependencies as per the Getting Started section.
Create an empty database (or optionally import/scrub from staging)
Run the setup script by visiting http://uni-elentra.localhost/.
Update the hostname to be
http://uni-elentra.localhost
instead of the default.Update the database to be
uni_elentra_me
,uni_elentra_auth
, etc. instead of the defaults.
Run the database migrations in the
elentra-1x-me
directory:
Last updated