On Tue, 18 Dec 2001, Alastair Stuart wrote:

> question one
>
> There is a need to add new client profiles to the centralised
> database, which create new application filesystems, new database
> structures and CGI trees.  Thus a new profile can be created
> and activated with the push of a few buttons, but, as it stands,
> the cgi structure looks like this
>
> https://www.foo.co.za/cgi-bin/client1/index.pl
> https://www.foo.co.za/cgi-bin/client2/index.pl
>
> it would be better if it was
>
> https://www.foo.co.za/client1
> https://www.foo.co.za/client2
>
> just using normal aliasing,
>
> but now the problem,
>
>
> -- how to add new aliases to httpd.conf or ./conf/clients.pl
> without having to restart apache ??

I've used

RewriteEngine on
RewriteRule ^/bin/([^/]+)/(.*) /usr/local/systems/work/$2


and then

sub db {
        # get the $db from the url
        my @split_line = split /\//, $ENV{"REQUEST_URI"} ;
        my $db = $split_line[2] ;
        return $db ;
}

and the $db I use to get a db handle

That's how I do it but my application leans towards cgi than mod_perl.

I have 4 different types of systems using the same codebase. Alltogether
13 systems. Works well.

regards

Scott

>
>  - i have found no linear solution, but there may be a
> craftier solution, even if some reworking needs to be done
>
>
> second question:
>
> Now that we have multiple application and databse instances
> running concurrently, how do we ensure that filehandle and
> Apache::DBI symbols are reliably encapsulated in their
> own namespsaces, all running off the same codebase ?
>
>
>
> I just feel i need a bit of affirmation that this is 100% before
> i start this arduous journey
>
> Thanks
>
>
>
>
> Alastair Stuart
> Systems Developer
> Quirk R & D
> 3rd Floor Armoury Building
> Buchanan Square
> 160 Sir Lowry Road
> Cape Town
> 7925
>
>  eml: [EMAIL PROTECTED]
> land: +27 21 462 7353
>  fax: +27 21 462 7354
>
> http://www.quirk.co.za
>
>

Reply via email to