4 ms·
Its 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
by mgrouchy 17y ago
Its 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.
- evgen 17y agoGiven the complexity to which apache and its ecosystem has grown and the consequences for screwing up this configuration task, this seems quite similar to sendmail in that I think a reasonable argument can be made that casual users should not be configuring this particular system. Period.
- mgrouchy 17y agoYou can make that argument, but reality is that casual users do configure apache so it ends up becoming a concern of the developers whether they want it to be or not. Like I said, in the long run, it might be better to make the switch, but a change can cause significant risk/inconvenience to casual users or users who have such complicated configurations it would require significant time to replicate in another format.
- scott_s 17y agoI 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 http://www.pantz.org/software/apache/apache13config.html This is representative of the more complex entries: <IfModule mod_alias.c> # # 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/" <Directory "/usr/local/apache/icons"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory> # # 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. # <Directory "/var/www/cgi-bin"> AllowOverride None Options ExecCGI Order allow,deny Allow from all </Directory> # # "/usr/local/apache/cgi-bin" should be changed to whatever your ScriptAliased # CGI directory exists, if you have that configured. # # <Directory "/usr/local/apache/cgi-bin"> # AllowOverride None # Options None # Order allow,deny # Allow from all # </Directory> </IfModule> 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.
- silentbicycle 17y agohttp://people.apache.org/~rbowen/presentations/apacheconEU2005/hate_apache.pdf http://people.apache.org/~rbowen/presentations/apacheconEU20... 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.
- compay 17y agoThank you, I was looking for a link to that presentation this morning and couldn't remember who had given it.
- yesimahuman 17y agoIn your example though, the complexity comes from having to know what things like "Order allow,deny" are. If you moved to lua I assume they would still use the same terminology, you would just have to represent it in lua instead of the current format. I think a file like this is easier for someone who has even a little bit of HTML experience to understand versus lua.
- scott_s 17y agoTo me, the complexity comes from using a pseudo-XML syntax to indicate control flow and function (?) calls.
- boredguy8 17y agoProgrammatic 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.
- silentbicycle 17y agoSmall thing, but it's "Lua", not "LUA". It means 'moon' in Portuguese, etymologically related to 'luna'/'lunar' in Romance languages. (Lua is from Brazil.)