You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Eli Marmor <ma...@elmar.co.il> on 2000/02/14 17:25:51 UTC

Configuration Syntax for Apache (was XML etc.)

[In this message, "configuration" refers only to httpd.conf
/ htaccess, and not to the build process]

For a long time, I have an interesting idea how to improve the
configuration of Apache, but was afraid to raise it (I'm afraid of
responses like "I'll take every opportunity to express my strong
disagreement" and other flames...). I heard too many complaints
regarding the conservative opinions of ASF, and was influenced.

Anyway, I see that the issue is under heavy discussions anyway, so
let me raise my idea, and please be nice with me. And one more
thing before going on: My English is so bad, so if the idea doesn't
convince you, don't attack it, but attack my English; The idea is
really good (IMHO...), but I don't know how to express it.

The main point against Apache I hear from customers and friends, is
the difficult configuration. In addition, there are too many things
which are impossible to do with the current syntax. And as
mentioned here by the person who proposed XML, the current syntax
is hard to be managed by an automatic front-end program.

As we all know, X is dead (not completely; After all, I'm using
Motif to write this message), but left after it an amazing
configuration syntax (X Resources). I'm not going to teach it here;
Just RTFM if you don't know it.

Anyway, I found some amazing facts about this interface:

1. With some minor changes, you can do ANYTHING that you could do
   with the current Apache configuration. Moreover, it is very easy
   to write an automatic script or program to translate from
   httpd.conf to the proposed syntax, so a backward compatibility
   is kept, and you even can continue to use the current
   configuration, with this script executed after each
   modification.

2. It is very easy to write a front-end for the X interface. I
   wrote my own in the past, based on the editres, but I made it a
   real GUI builder. You may also write a Microsoft-like "+-" tree
   to control the values of the directives. Of course, in such a
   tree (or in editres tree), you have all the possible attributes,
   and not only the attributes defined by the configuration file.
   The other attributes (or resources), will have their default
   values, of course.

3. There are many users who are familiar with that syntax, much
   more than users who are familiar with Apache conf. Moreover,
   since it is easy to write an automatic translator, even users
   who know the Apache conf but not the X conf, can continue to use
   their familiar interface.

The exact syntax (sorry, no time to write an exact BNF...):
===========================================================
[hostname][:port]/[dir][/file]#directive  	value

dir:	/one-dir-level
	or any concatanation of it (like /many/dir/levels)

file:	filename | class

class:	like text/html, etc.

You can use "*" instead of zero or more levels, or "?" instead of
one level.

Of course, many things which are relevant for X, are relevant here
too, like resource types.

The parser must be re-written from scratch.

The migration to such a syntax, should not force anybody to re-
write his/her configuration file; Instead, the existing file may be
used, and the translator will be executed to update the X resource
file.

An example:
===========
<IfDefine SSL>
<VirtualHost www.kuku.com:443>
<Directory /path/to/dir>
Options Indexes
</Directory>
</VirtualHost>
</IfDefine>

may be translated to:

#ifdef	SSL
www.kuku.com:443//path/to/dir*#Options      Indexes
#endif

("*" is needed to include the sub-direcotries and sub-sub etc. of
the "/path/to/dir". Of course, you may replace the "www.kuku.com",
or the "443", or the "path", or the "to", or the "dir", by "?". You
may also use "*" to replace a variable number of levels, for
example: "*to/dir*#Options:	Indexes"_.

After this change is done in Apache, editres can be re-written so
it will be based not on low level X code, but on an independent
protocol based on HTTP (editres protocol is already half
independent), so we can have an immediate GUI front-end for Apache.
Of course, the server side module of Editres which is included with
Xmu, should be re-written to be an Apache module, which accesses
the current configuration, receives requests for changes, accesses
the configuration file to save them, and re-starts Apache.

There are a lot of other benefits and power in this format.

Notes:
======
1. Since this interface is stronger than the current one, it is
   easy to convert TO it, but not FROM it to the current.
2. Complex definitions, like the mod_rewrite rules, are not
   influenced by the new syntax, because the is no different syntax
   of the value, but only of the directives and the limiting tags
   before and after.
3. Front-ends, while having easy life with the proposed syntax, yet
   should support comments and ifdefs, but I believe that it is
   much easier for a program than dealing with the current syntax.
4. The syntax of X, not only has many users who are familiar with,
   but also many programs which know how to deal with it (like
   editres). It is also a prooved interface, and we can even grab
   parts of the parsing code of it from the X sources (after all, X
   is not GPL'ed, but covered by a license which is compatible with
   the license of Apache!). There are many other pieces of code
   which may be re-used.

Almost all the people I told them this idea and discussed it with
them, loved it. I hope you too...

-- 
Eli Marmor
marmor@elmar.co.il
El-Mar Software Ltd.

Re: Configuration Syntax for Apache (was XML etc.)

Posted by David Tulloh <lo...@dawn.fazeware.com>.
I agree as well
This would also allow for easy implementation for any operation system

I have written a very basic frontend for the win32 version of apache and found retriving output was difficult, after examining the possibility of putting up a configuration editor concluded it was all too hard and stopped

Anyway... back to the API whatever the solution it has to be well documented
I now follow the newsgroup and poke at the code, bun and full documentation.  I personally would find it hard to use any solution

Re: Configuration Syntax for Apache (was XML etc.)

Posted by David Reid <dr...@jetnet.co.uk>.
Sorry to come to this discussion so late (been moving house) but I agree
with Manoj on this.

d.
----- Original Message -----
From: "Manoj Kasichainula" <ma...@io.com>
To: <ne...@apache.org>
Sent: Saturday, February 19, 2000 2:52 AM
Subject: Re: Configuration Syntax for Apache (was XML etc.)


> Here's my 2 cents on Apache configuration. Apache should not have a
> single configuration engine.
>
> There should be a configuration API that provides all the config data
> that Apache needs. It should provide dynamic runtime configuration and
> an optional extension for actully changing it.
>
> This way, one group can implement and use a 1.3-style configuration
> engine. Another can use XML, another can use X resources, or whatever.
> I'm sure one would use some sort of database or directory backend. And
> modules that supported the optional extension for changing runtime
> configuration could be used by an enhanced mod_snmp, mod_tivoli, or
> whatever.
>
> Apache would then probably adopt a single config engine as the
> default, and admins who want something that fits with the rest of
> their infrastructure or are just really bored can use one of the
> others.
>
> There was some discussion about such an API sometime in mid-1999.
>
> Now, I think this would be very cool, and I'd even help, but I don't
> want to see it delay Apache 2.0.
>
>

Re: Configuration Syntax for Apache (was XML etc.)

Posted by Manoj Kasichainula <ma...@io.com>.
Here's my 2 cents on Apache configuration. Apache should not have a
single configuration engine.

There should be a configuration API that provides all the config data
that Apache needs. It should provide dynamic runtime configuration and
an optional extension for actully changing it.

This way, one group can implement and use a 1.3-style configuration
engine. Another can use XML, another can use X resources, or whatever.
I'm sure one would use some sort of database or directory backend. And
modules that supported the optional extension for changing runtime
configuration could be used by an enhanced mod_snmp, mod_tivoli, or
whatever.

Apache would then probably adopt a single config engine as the
default, and admins who want something that fits with the rest of
their infrastructure or are just really bored can use one of the
others.

There was some discussion about such an API sometime in mid-1999.

Now, I think this would be very cool, and I'd even help, but I don't
want to see it delay Apache 2.0.


Re: Configuration Syntax for Apache (was XML etc.)

Posted by "Kevin A. Burton" <bu...@relativity.yi.org>.
Eli Marmor wrote:
> 
> I see that we don't agree in 100%, and there may be serious
> considerations for both sides, but I wouldn't include the following
> in them:
> 
> > Andway the idea is basically the same I posted except IMO you are using
> > obsolete technologies.
> 
> because it reminds me what Microsoft has to say about Linux:
> 
> "based on UNIX, an obsolete 30 years old technology..."  ;-)
> 
> And meanwhile, all of us edit our conf files by hand...
> (it may be good for us, but not for new users).

So that is not what I meant.  Microsoft believes in closed source,
revolutionary software development... which leads to bad code.... very
bad code that is prone to security problems.

XML is just the next evolution.  It will allow us to get this done about
20% faster and I think a lot of people would rather work with this
technology.

Kevin

-- 
Kevin A Burton
http://relativity.yi.org
Linux - The revolution will NOT be televised


RE: Configuration Syntax for Apache (was XML etc.)

Posted by "William A. Rowe, Jr." <wr...@lnd.com>.
Jim, thanks for the summary, you hit the nail on the head.

> These pretty much boil down to:
>
>  1. I want a GUI

On XML et. al... I don't much care if it is the existing syntax, XML syntax,
or raw hex :->

When we start talking XML - I'm simply concerned that we don't end up with
the same obscufication as CSS.

The existing syntax is clean and simple.  If the alternate syntax is clean
and simple, we can keep both parsers (ok - I hear the groans already) and
offer a one line "XmlImport filespec" directive for httpd.conf.  If someone
wants to write it, go ahead and code it.  Then we find out the answer to the
statement ... if we build it they will come.

What we have GOT to get straight are the loads of questions on the
newsgroups about syntax.  Seems to me that admins simply don't read (even
inline comments).  If we give the existing config parser a comments block,
so that preceeding comments are <<<OPTIONALLY>>> sucked in with the
directives by the parser, anyone can have their clean syntax and comment
blocks too... we just need a dump (again with the preceeding comment lines
preserved).  Perhaps it's already hiding in there somewhere?

A BIG growth chuck in servers will be (already is?) the cable modem/AODI
homebody.  If we want to keep posting the numbers we have seen... Apache
needs to be shrinkwrapped to Windows.  However - if you want Apache to be
THE Un*x host, and are ready to give up on Windows - then we know where are
numbers are headed in two years.  (Five years down the road may be a 180`
turn to Linux for home users.  I'm not holding my breath either way.)

I really couldn't care less that the Windows 95/98 is based on CP/M -
NT/2000 is a 32 bit preemptive multitasking - multiprocessor enabled
architecure.  Yes - I too wish 95/98 would go away (it won't - there is
another consumer version in the pipe in spite of Windows 2000).  Yes - it's
insecure, it's a poor choice to advertise to the public, and fools will
continue to try to host on it anyway.  If not Apache, then with PWS or
another free product, they will be out there.

Is Linux better than Windows?  WHO CARES?  If we are going to take pride in
Apache - as demonstrated by the numbers - then we better be there for the
all of them.

Windowz and Uniqs flames get us nowhere.


>  2. I want Frontpage extensions

MS has no interest in assuring that the Frontpage extensions run on
Apache/NT, while cutting into PWS and IIS.  Rather than flaming the Apache
Foundation, perhaps slashdot should be asking MICROSOFT where the FP
extention documentation for Apache 1.3.11/Win is hiding.  Who's pulling the
cart here?

>  3. I want ASP

And MS will give us carte blanc to tie in the Scripting Host on Windows?
Again, who cares?  - Apache's #1 goal is cross platform compatibility - so
it's irrelevant.  Are we about to see Windows Scripting Host/GNU release?  I
doubt it.





Re: Configuration Syntax for Apache (was XML etc.)

Posted by Ben Laurie <be...@algroup.co.uk>.
Eli Marmor wrote:
> 
> I see that we don't agree in 100%, and there may be serious
> considerations for both sides, but I wouldn't include the following
> in them:
> 
> > Andway the idea is basically the same I posted except IMO you are using
> > obsolete technologies.
> 
> because it reminds me what Microsoft has to say about Linux:
> 
> "based on UNIX, an obsolete 30 years old technology..."  ;-)

Whereas Windoze is based on CP/M, also obsolete, but not a technology
:-)

Cheers,

Ben.

--
SECURE HOSTING AT THE BUNKER! http://www.thebunker.net/hosting.htm

http://www.apache-ssl.org/ben.html

Y19100 no-prize winner!
http://www.ntk.net/index.cgi?back=2000/now0121.txt

Re: Configuration Syntax for Apache (was XML etc.)

Posted by Eli Marmor <ma...@elmar.co.il>.
I see that we don't agree in 100%, and there may be serious
considerations for both sides, but I wouldn't include the following
in them:

> Andway the idea is basically the same I posted except IMO you are using
> obsolete technologies.

because it reminds me what Microsoft has to say about Linux:

"based on UNIX, an obsolete 30 years old technology..."  ;-)

And meanwhile, all of us edit our conf files by hand...
(it may be good for us, but not for new users).

-- 
Eli Marmor

Re: Configuration Syntax for Apache (was XML etc.)

Posted by "Kevin A. Burton" <bu...@relativity.yi.org>.
Eli Marmor wrote:
> 
> [In this message, "configuration" refers only to httpd.conf
> / htaccess, and not to the build process]
> 
> For a long time, I have an interesting idea how to improve the
> configuration of Apache, but was afraid to raise it (I'm afraid of
> responses like "I'll take every opportunity to express my strong
> disagreement" and other flames...). I heard too many complaints
> regarding the conservative opinions of ASF, and was influenced.
> 

The environment here is good.  Don't worry about getting flamed and
shaking the boat.  It is a good thing.

Andway the idea is basically the same I posted except IMO you are using
obsolete technologies.

It really needs to be:


Apache HTTP XML Schema and existing httpd.conf -> Swing GUI -> User
configures system -> httpd.xml -> XSLT -> httpd.conf

That is the correct technical architecture IMO.  As soon as I get
JetSpeed 1.0 I am going to hack this out.

Kevin

-- 

Kevin A Burton
http://relativity.yi.org
Message to SUN:  "Open Source Java!"
"For evil to win is for good men to do nothing."