[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lon-capa-admin
Subject:    Re: [LON-CAPA-admin] Multiple Domains on one server
From:       Guy Albertelli II <guy () albertelli ! com>
Date:       2005-01-10 18:07:49
Message-ID: 200501101807.j0AI7nf7005224 () mileva ! lite ! msu ! edu
[Download RAW message or body]

Hi Mark,

> Is there a short writeup or e-mail in the lists that describes what I need 
> to do? I searched around and didn't find anything (I really thought I saw 
> something go by).

Hrrm, I remeber writing something but I can't find it when
searching...  (Maybe google will be a firend and index this one as
important...)


HOW-TO setup a Multi-Domain Lon-CAPA server. 

1) IMPORTANT: whatever is the 'home domain' of the machine must be
listed _last_ in the hosts.tab file.
 (What is the 'home domain' you ask? It is the one that you specifiy
 when you run UPDATE, and the one that is stored in
 /etc/httpd/conf/loncapa.conf)

2) IMPORTANT: You _CANNOT_ have 2 authors with the same username
in the different domains. 
   If you create  albertel@domain1 and albertel@domain2 they will end
   up sharing the same authoring space.

   (We have an idea for fixing this but it hasn't been a high priority
   for us, since it will /hurt/ to do.)

3) IMPORTANT: Please reread points 1 and 2, they will save you pain.

4) To adda second domain to a machine, just add an entry to hosts.tab
   and domain.tab

For Example:

my development machine is 'laptop.albertelli.com'

in hosts.tab is:
casal1:casadepopo:library:laptop.albertelli.com:69.241.238.75
annarborl1:annarbor:library:laptop.albertelli.com:69.241.238.75

and in domain.tab is:

casadepopo:Don't Ask:krb4:MSU.EDU:en-US:Ann Arbor, MI:-83.745:42.283
annarbor:Guy at Home:krb4:MSU.EDU:en-US:Ann Arbor, MI:-83.745:42.283


annarborl1 and annarbor is the home host and domain and is thus listed
last.


Now do an httpd restart or reload and restart lonc/d/sql

And you be rocking.


5) If you want the is an expirmental patch we run that makes it so
   when someone goes to 
glhs.loncapa.org

The Domain field gets 'glhs' in it.

It is for lonlogin.pm 

diff -u -r1.55 -r1.55.2.1
--- lonlogin.pm 12 Nov 2003 16:55:40 -0000      1.55
+++ lonlogin.pm 27 Jan 2004 23:40:31 -0000      1.55.2.1
@@ -109,6 +109,10 @@
     my $iconpath= 'http://'.$ENV{'HTTP_HOST'}.':'.$port_to_use.
                   $r->dir_config('lonIconsURL');
     my $domain  = $r->dir_config('lonDefDomain');
+    my $testdomain=(split(/\./,$ENV{'HTTP_HOST'}))[0];
+    foreach my $posdom (values(%Apache::lonnet::hostdom)) {
+       if ($posdom eq $testdomain) { $domain=$testdomain; }
+    }
     if (($ENV{'form.domain'}) &&
         ($Apache::lonnet::domaindescription{$ENV{'form.domain'}})) {
        $domain=$ENV{'form.domain'};


-- 
guy@albertelli.com  LON-CAPA Developer  0-7-3-2-

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic