Have any of you successfully configured more than one VuFind 2.x site on the same server? For various reasons, we do NOT want to run a VuFind multisite configuration (as described in the VuFind wiki)  but rather, keep two completely separate codebases for two (and in future, more) different sites. 


We have not had problems doing so with VuFind 1.x, but with VuFind 2.x, the template files in the theme for whatever site is accessed first following an Apache restart is used for all other VuFind 2.x sites. It appears the template determines the base directory for the first site accessed and then uses it for all subsequent site requests. If the specified template is the same for both sites the second started site uses the template from the first and if they specified template name is different, the second site fails to display anything (returning a blank 500 response with the logs recording a “cannot find the specified template” error).

 

Here’s our configuration:

 

1.       Ubuntu 13.10

2.       Two (and in future more) sites configured in Apache.

3.     Separate Solr ports, one per site.

4.       Not running SuExec, so each site is running under its respective user (say site1:site1 and site2:site2).

5.       Vufind.sh is started under the respective site1:site1 or site2:site2 local user and the $VUFIND_HOME environment variable is set in vufind.sh for each site (although we have also tried with setting the path variable explicitly in the user’s .profile/.bashrc so that it is satisfactorily there, and also in the /local/httpd-vufind.conf file, but the issue is not resolved). Running ./vufind.sh check for each site spits out the correct $VUFIND_HOME and $SOLR_HOME values for each site. Using a phpinfo command in each sites public folder also reports the correct values for each site.

6.       To try to get to the bottom of the actual issue, we’ve tried hard-coding the baseDir path in the ThemeInfo’s constructor, but it continues to access the theme from the other site. Haven’t looked too much into it as not as familiar with the Zend framework, but in Initializer.php the tools object is grabbed via the serviceManager which is perhaps a singleton which, due to some incorrect configuration, leaks across apps?


So in summary, everything about VuFind works fine with 2 separate sites, except for the theme templates, which appears to be getting the baseDir from a cached source instead of the actual $VUFIND_HOME path variable.

 

Before digging into the source further, we felt it would be best to check in here first. Any suggestions or guidance would be greatly appreciated.


Jonathan Jacobsen, BA, MLIS
Andornot Consulting
www.andornot.com

jjacobsen@andornot.com
1-866-266-2525 x707