lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sun, Aug 4, 2013 at 9:14 PM, Sean Conner <sean@conman.org> wrote:
> It was thus said that the Great Henrique Gogó once stated:
>> One solution that I found was use simple cgi configuration on lighttpd.
>> No cgilua, no fastcgi, no dependencies, just enabled cgi module in lighttpd
>> and added:
>>
>> cgi.assign = (
>>  ".lua"  => "/usr/bin/lua",
>> )
>>
>> But I've been read that cgi is too slow, and FastCGI is better.
>> "Pure cgi" is too bad to use? I think so simple and fast to configure that
>> I'm thinking use this approach to start my web application.
>
>   Unless you are seeing HTTP 500 responces to requests, or the host the
> webserver is running on has an extemely high load, then CGI is the simplist
> thing that can work.  My own blog (http://boston.conman.org/) is generated
> and served up via CGI [1] and I've never had an issue with a high system
> load.
>
>   At the very least, it will get you up and running while you investigate
> other methods of running your site.
>
>   -spc (You might be surprised at how far plain CGI can get you ... )
>
> [1]     Actually, the main page (index.html) and the two data feeds
>         (index.atom and bostondiaries.rss [2]) are rendered as static pages.
>         When you click on a individual post, however, the page is generated
>         via a CGI-based program.

Simple CGI scripts that don't need persistent sessions do a pretty
good job of minimizing the CGI overhead. It's also decent for
prototyping (but the lack of persistent session data can make the
prototype mechanically dissimilar from a final implementation) due to
the ease of configuration.

/s/ Adam