On Fri, 27 Nov 1998, Dani wrote:
> The idea would be to have something like that
>
> <module>
> <name>mod_autoindex</name>
>
> <directive>
> <name>AddAltByType</name>
> <sintax> <some standard way of descrbing taht sintax here> </sintax>
> <context>
> <el>server_config</el>
> <el>virtual_host</el>
> <el>directory</el>
> <el>.htaccess</el>
> </context>
> <override>
> <el>indexes</el>
> <override>
> <status>Base</status>
> </directive>
> <comment>
> This sets the alternate text to displa (...)
> </comment>
> </module>
>
>
> Then the server documentation for directives could be automatically generated
> and converted to html or txt or some other format
Yes, this would also be a good "excuse" to finally document the merging
behaviour of directives (e.g. AddType's are merged between vhosts, but
ServerName overrides the main server definition).
The above description should also describe the argument(s) of the
directive, such that a GUI could ask for input in the appropriate way.
You'd also want to be able to note that some directives can be repeated
multiple times to build up "tables" of arguments. For example, AddHandler
can be repeated to build up a table of extension-to-handler mappings, so
you would (probably) want to configure this via an on-screen list with
options to add/remove/edit entries.
So perhaps an extension to the above like this:
<directive>
<name>AddType</name>
<description>Map file extension to MIME-type</description>
<context>main_server virtual_host per-directory</context>
<override>fileinfo</override>
<arguments>
<el><name>Handler</name>
<type>text[100]</type>
</el>
<el>
<name>Extension</name>
<type>text[20]</type>
</el>
</arguments>
<repeat>table-append</repeat>
<merging>table-append</merging>
</directive>
This is only a rough idea. There is lots more you probably want to
represent, such as the fact that the extension argument can be repeated.
You'd also want to define the "types" used for asking for input (perhaps
allow for validy checking of integer types, etc).
The intention of the <repeat> section is to show what happens if the GUI
encounters multiple copies of this directive: in this case, it can append
them to some table, and (presumably) would display them as a table. The
<merging> section tells us that when Apache merges this directive (in a
vhost or per-directory context) it appends new values, rather than
overriding the existing values.
Paul