Surprised to see so much discussion on that. Instead, would expect someone to simply implement it, throw it on the table, and provide instructions for building it into your own apache. If it catches on, then you have a replacement to the current config syntax. That said, in my experience, admins are slow to change. There are still sites running Apache 1.3 out there.
Should Apache replace its current httpd.conf with Lua?
11–20 of 48 posts
Re: Should Apache replace its current httpd.conf with Lua?
#12Its a neat idea, but I would echo the sentiment brought up in the thread linked that casual users would have a much harder time with a lua config in comparison to the current one. Its probably a good idea to move in this direction in the long run, but there is always a risk of displeasing your current users.
This is representative of the more complex entries:
#
# Note that if you include a trailing / on fakename then the server will
# require it to be present in the URL. So "/icons" isn't aliased in this
# example, only "/icons/". If the fakename is slash-terminated, then the
# realname must also be slash terminated, and if the fakename omits the
# trailing slash, the realname must also omit it.
#
Alias /icons/ "/usr/local/apache/icons/"
Alias /icons/ "/var/www/icons/"
Options Indexes MultiViews
AllowOverride None
Order allow,deny
Allow from all
#
# ScriptAlias: This controls which directories contain server scripts.
# ScriptAliases are essentially the same as Aliases, except that
# documents in the realname directory are treated as applications and
# run by the server when requested rather than as documents sent to the client.
# The same rules about trailing "/" apply to ScriptAlias directives as to
# Alias.
#
# ScriptAlias /cgi-bin/ "/usr/local/apache/cgi-bin/"
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
AllowOverride None
Options ExecCGI
Order allow,deny
Allow from all
#
# "/usr/local/apache/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#
#
# AllowOverride None
# Options None
# Order allow,deny
# Allow from all
#
That is a language, and it's one that exists solely for Apache config files. I think using an actual programming language would be easier for most people.Re: Should Apache replace its current httpd.conf with Lua?
#13Its a neat idea, but I would echo the sentiment brought up in the thread linked that casual users would have a much harder time with a lua config in comparison to the current one. Its probably a good idea to move in this direction in the long run, but there is always a risk of displeasing your current users.
Re: Should Apache replace its current httpd.conf with Lua?
#14Its a neat idea, but I would echo the sentiment brought up in the thread linked that casual users would have a much harder time with a lua config in comparison to the current one. Its probably a good idea to move in this direction in the long run, but there is always a risk of displeasing your current users.
Programmatic configuration solutions seem easier to me in a Lua world than the current .conf approach, which means it would be easier to develop tools for the casual user.
Re: Should Apache replace its current httpd.conf with Lua?
#15Its a neat idea, but I would echo the sentiment brought up in the thread linked that casual users would have a much harder time with a lua config in comparison to the current one. Its probably a good idea to move in this direction in the long run, but there is always a risk of displeasing your current users.
I wonder if the people who made those comments are in denial about the complexity of Apache configuration files. Having never seen one, I Googled "apache sample config file" and I came up on this page: http://www.pantz.org/software/apache/apache13config.html This is representative of the more complex entries: # # Note that if you include a trailing / on fakename then the server will # require it to be present in the…
Right, and it's a language with a brittle, inconsistently documented, largely ad hoc syntax. While Lua's syntax has its quirks (the syntax for lambdas is a little cumbersome, arrays are indexed from 1), that's because it is designed to be straightforward for simple use by non-programmers. The advanced features* don't get in the way if you're only using it as a log/config/etc. file format.
* Tail-call optimization, closures, coroutines, etc.
Re: Should Apache replace its current httpd.conf with Lua?
#16Re: Should Apache replace its current httpd.conf with Lua?
#17Surprised to see so much discussion on that. Instead, would expect someone to simply implement it, throw it on the table, and provide instructions for building it into your own apache. If it catches on, then you have a replacement to the current config syntax. That said, in my experience, admins are slow to change. There are still sites running Apache 1.3 out there.
Generally they do have development versions daily updated and built and tested under the hood. Generally they do provide support and feedback to these software by bug reports or even with changesets.
But they are not slow.. most of the time they do work out of your eye sight.
I can bet some admins are trying to see if mod_lua can be a good replacement for the current configuration.
For myself I do not like it to happen. Because most of the deployments of apache are huge and this will break too many things.
And yes, if it's working do not change it :)
(edit: gramer and typo corrections)
Re: Should Apache replace its current httpd.conf with Lua?
#18I wonder what is wrong with the current way of configuring apache. I might be biased, but I have experience with both lighttpd and apache and I always found the apache way of doing things perfectly fine and actually prefer it to the kind-of procedural style of lighty. Let's just hope they don't switch to an XML based configuratino file. We don't need even more filler-code in our configuration files. XML just isn't hu…
Re: Should Apache replace its current httpd.conf with Lua?
#19key=value is really so hard that we need to replace m4 with lua? Honestly? Before you feel the need to flame, imagine if this proposal had been for implementing the config file in COBOL (a language designed to be code readable by non-technical people). Would you still believe it to be a good idea?
What ever happened to wanting to keep things simple?
Re: Should Apache replace its current httpd.conf with Lua?
#20I wonder what is wrong with the current way of configuring apache. I might be biased, but I have experience with both lighttpd and apache and I always found the apache way of doing things perfectly fine and actually prefer it to the kind-of procedural style of lighty. Let's just hope they don't switch to an XML based configuratino file. We don't need even more filler-code in our configuration files. XML just isn't hu…
As far as I can tell XML config files (at least those intended to be hand-edited) have largely fallen out of favor in non-Java open source projects. I also don't mind the current config file, but I've been using Apache for more than 10 years so I've probably lost all perspective at this point. Having the config file in Lua would certainly make it eaiser to automate, validate and document though.
mod_perl already allows for a totally dynamic configuration which should be sufficient in terms of automation.
The documentation is quite perfect already and would IMHO lose quality if the syntax changes this drastically.
The only point I'm willing to hand you is the validation argument, although the current parser seems to be doing a decent enough job already.
No. Discussions like these feel to be motivated by artistic considerations instead of practical ones. Think of all the external documentation such a step would invalidate. Books, Tutorials, Blogs. And think of the external addon modules that would probably break because of this.
Remember the 1.3 => 2.0 switch and how long that took and consider that 2.0 actually had some real advantages compared to 1.3.