About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
configuration:using_vufind_as_the_site_root

This is an old revision of the document!


Using VuFind as the Site Root

By default, VuFind is configured to reside within a directory of your website. However, if you want to configure VuFind to load at the root of your domain, follow these steps:

  • In the [Site] section of local/config/vufind/config.ini, set the “url” setting to “http://yourdomain.edu” (obviously replacing this with your real domain name).
  • In httpd-vufind.conf, make the following changes:
    • In the AliasMatch lines at the top, change “AliasMatch ^/vufind2/themes/…” to “AliasMatch ^/themes/…”.
    • Remove the Alias line under “Configuration for general VuFind base”.
    • In VuFind 2.5 and earlier, RewriteBase should be /; in later versions which use a <Location> directive instead of a RewriteBase, this should read <Location />.
  • You may need to create a virtual host in Apache to complement httpd-vufind.conf which uses your VuFind public directory as its DocumentRoot. For example:
NameVirtualHost *:80

<VirtualHost *:80>
    DocumentRoot /usr/local/vufind2/public
    ServerName yourdomain.edu
    ServerAlias www.yourdomain.edu
</VirtualHost>

...if you have already installed VuFind

Even if you have already installed VuFind, you should be able to change it to run as the site root fairly easily. Just follow these steps:

  1. In the $VUFIND_HOME directory, run “php install.php” and run through the installer's questions. Use “/” as the path, and answer the other questions the same as before (use defaults if you are unsure). This will rewrite VuFind's Apache configuration file, and after you restart the Apache service, the changes should take effect. The install.php script will make a backup of your previous configuration (in $VUFIND_LOCAL_DIR, with a date/time-based file extension), so if you need to revert your changes, or if you wish to compare the new configuration against the old one to be sure you answered all the questions correctly, you can easily do so.
  2. As noted above, you should update the url setting in the [Site] section of your local config.ini file.
  3. As noted above, you may need to create an Apache VirtualHost for VuFind, or if you already have one, you may need to explicitly set the DocumentRoot to $VUFIND_HOME/public to ensure that Apache loads the appropriate content at the site root.
configuration/using_vufind_as_the_site_root.1582553374.txt.gz · Last modified: 2020/02/24 14:09 by demiankatz