Frank Boehme wrote:
> > > Also site admins would be abble to mess witheach other,
> > > if they had the same credentials.
> >
> > But that's the point -- you _don't_ give them the same credentials. In
> > the same way the database root user and the midgard user can concurrently
> > access the site,
>
> Got you. Now it's all clear to me. Commonuser/commonpass are the
> credentials apache uses to talk to mysql. That's why there is only few
> connections.
Right. Once a connection is established and authorized by the mysql
server,
the database client (mod_midgard in this case) can issue "USE
databasename"
to switch active databases while retaining the connection. This is
exactly
how it is implemented, BTW.
If you use multidb in this setting it uses database connections
efficiently
but there's not much benefit at the 'user' level. But recalling the
earlier
example:
<VirtualHost _default_:*>
Servername www.user1.com
MidgardDatabase user1 commonuser commonpass
</VirtualHost>
<VirtualHost _default_:*>
Servername admin.user1.com
MidgardDatabase user1 commonuser commonpass
MidgardPageDatabase adminsite commonuser commonpass
</VirtualHost>
<VirtualHost _default_:*>
Servername www.user2.com
MidgardDatabase user2 commonuser commonpass
</VirtualHost>
<VirtualHost _default_:*>
Servername admin.user2.com
MidgardDatabase user2 commonuser commonpass
MidgardPageDatabase adminsite commonuser commonpass
</VirtualHost>
what mod_midgard will do is fetch host, page and style info from the
MidgardPageDatabase and then switch to the MidgardDatabase. The effect
is that the pages are built using the MidgardPageDatabase but they
execute
while having access to only MidgardDatabase. So you won't even see the
pages
and style info of the admin site, while you will be able to use them.
User
credentials are taken from the MidgardDatabase.
There's more possibilities to use this with prefixes and stuff but I
haven't
fully explored that yet.
The absolute separation you get (physical database boundaries, not
sitegroups)
is what breaks Asgard: Asgard attaches data to the host and page record
that
it tries to fetch at runtime, and those are no longer available after
the
database switch. These problems only arise with shared sites like the
admin site;
sites that fully execute from one database see no difference from the
way it
was before.
> The grant tables of the various databases share one *mysql*
> user while midgard user credentials are only relevant to mod_midgard and
> possibly some mgd_xxx functions.
You got it.
> Sorry, I must have sounded stupid.
Don't worry, it took me a while to get used to the concept too. And I
built
it fer${DEITY}ssake.
Emile
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]