Kevin,
After a bit of manipulating we came up with what seems to work.
And yes I did have to change the common.inc.php as you suggested.
In the httpd.conf file I had to change a few things.
- Code: Select all
ServerName localhost
NameVirtualHost {IP Address of the system}
Then I created the VirtualHost entries:
- Code: Select all
# Main Site Host 1
<VirtualHost xxx.xxx.xxx.xxx>
ServerName conferences.isp.com
ServerAdmin contact@isp.com
DocumentRoot /usr/local/apache2/htdocs
ErrorLog "|/usr/local/sbin/cronolog /usr/local/apache2/logs/%Y/%m/error.log"
CustomLog "|/usr/local/sbin/cronolog /usr/local/apache2/logs/%Y/%m/access.log" combined
RewriteEngine On
RewriteMap lowercase int:tolower
RewriteCond %{REQUEST_URI} ^/static/
RewriteRule ^/static/(.*)$ /conference/${lowercase:%{SERVER_NAME}}/$1 [L]
RewriteCond %{REQUEST_URI} ^/global/
RewriteRule ^/global/(.*)$ /conference/global/$1 [L]
</VirtualHost>
# Virtual Host 1
<VirtualHost xxx.xxx.xxx.xxx>
ServerName conference-1.isp.com
ServerAdmin contact1@isp.com
DocumentRoot /usr/local/apache2/htdocs
ErrorLog "|/usr/local/sbin/cronolog /usr/local/apache2/logs/%Y/%m/conference-1.error.log"
CustomLog "|/usr/local/sbin/cronolog /usr/local/apache2/logs/%Y/%m/conference-1.access.log" combined
RewriteEngine On
RewriteMap lowercase int:tolower
RewriteCond %{REQUEST_URI} ^/static/
RewriteRule ^/static/(.*)$ /conference/${lowercase:%{SERVER_NAME}}/$1 [L]
RewriteCond %{REQUEST_URI} ^/global/
RewriteRule ^/global/(.*)$ /conference/global/$1 [L]
</VirtualHost>
#Second Conference (Same IP address as above)
<VirtualHost xxx.xxx.xxx.xxx>
ServerName conference-2.isp.com
ServerAdmin contact2@isp.com
DocumentRoot /usr/local/apache2/htdocs
ErrorLog "|/usr/local/sbin/cronolog /usr/local/apache2/logs/%Y/%m/conference-2.error.log"
CustomLog "|/usr/local/sbin/cronolog /usr/local/apache2/logs/%Y/%m/conference-2.access.log" combined
RewriteEngine On
RewriteMap lowercase int:tolower
RewriteCond %{REQUEST_URI} ^/static/
RewriteRule ^/static/(.*)$ /conference/${lowercase:%{SERVER_NAME}}/$1 [L]
RewriteCond %{REQUEST_URI} ^/global/
RewriteRule ^/global/(.*)$ /conference/global/$1 [L]
</VirtualHost>
We had a Conference Manager request us to be able to put up some additional documents that could be downloaded from the conference site. We also wanted it to be easy to post if needed a simple MOTD incase we had to take the server down for any length of time. I'm not sure if you have thought about it but a simple admin level interface could be setup to upload additional documents that could be linked to from various places since the admin forms allow html in them as well.
Since I like separate log files I also separated them out incase the conference managers wanted statistics later on.
I also added the following index.php at the root of our server to redirect based upon HTTP_HOST.
- Code: Select all
<?php
switch ($HTTP_SERVER_VARS['HTTP_HOST']) {
case "conferences.isp.com":
echo '<meta http-equiv="refresh" content="0; URL=http://conferences.isp.com/ocs/index.php">';
break;
case "conference-1.isp.com":
echo '<meta http-equiv="refresh" content="0; URL=http://conference-1.isp.com/ocs/index.php?cf=1">';
break;
case "conference-2.isp.com":
echo '<meta http-equiv="refresh" content="0;
URL=http://conference-2.isp.com/ocs/index.php?cf=2">';
break;
}
?>
This allows each conference to be refered to directly by:
http://conference-1.isp.com
http://conference-2.isp.com
And it still maintains the central site at:
http://conferences.isp.com
It then allows each conference to have a separate "static" area refered to directly by say
http://conference-1.isp.com/static/document.doc
and also a "global" area refered to directly by
http://conference-1.isp.com/global/motd.html
etc.
At least it seems to work here for us we haven't run into any obvious problems yet, as always your millage may vary.
One thing I did notice is that the OAI part returns all records reguardless of conference, a good suggestion would be to treat each conference as a OAI "Set" so that a harvester could harvest a single conference only if they wanted to or if you adopt the above code changes the OAI script should only return records from the conference associated with ServerName it was called by.
Brian.