[Xitami] problems with vhosts

Ewen McNeill xitami@lists.xitami.org
Sat, 09 Jun 2001 02:51:12 +1200


In message <200009141008.5852921.6@ec-computers.net>, "bernd hohmann" writes:
>defined default security:
>   admin=0
>   [/admin]
>     {empty}
>
>BERND security
>   admin=1
>   [/admin]
>     berndadmin=berndadmin
>[....]
>this should disallow the admin-function when browsing the default-host but 
>allow it when using host BERND.

The issue here is that the [security] admin=N setting controls whether
the admin section is even started up, as Xitami starts.  At this point
only the main configuration file (xitami.cfg, defaults.cfg) is
available, and hence the setting is a global setting.  If you disable it
in the main file, then the admin section is never started, so will not
be available under a virtual host or anywhere basically.

As far as I can tell the [security] admin=N setting in the virtual hosts
is never even tested.

What you could possibly do (you'll need to test this with your setup),
is use the [wsx] admin=... settings in the virtual hosts where you don't
want the admin available, to override what the /admin path maps to.
This should cause "the function you requested is not implemented" for
thos virtual hosts.  Providing it does, you can then take the password
section out for /admin for those virtual hosts, and anyone trying will
immediately get that error message.  Then on the virtual host where you
do wish to access the admin, you can use the password section, and not
override the [wsx] admin=.... setting, and it should, in theory, work
there.

Possibly the documentation should be clearer as to what settings are
global and what are per-virtual-host.

Ewen

-- 
Ewen McNeill, Technical Consultant, iMatix Corporation  www.imatix.com