Building Appweb with CGI Support
Appweb includes support for CGI but it is not enabled by default to minimize the security surface. If you wish to use CGI, you need to enable CGI and rebuild Appweb.
To build Appweb with CGI support:
make ME_COM_CGI=1
CGI Configuration
The following default configuration is enabled in appweb.conf once Appweb is built with CGI support.
AddHandler cgiHandler exe cgi cgi-nph out bat cmd pl py php ScriptAlias /cgi-bin/ "${DOCUMENTS}/../cgi-bin" Action application/x-perl /usr/bin/perl Action application/x-python /usr/bin/python Action application/x-lua /usr/bin/lua Action application/x-ruby /usr/bin/ruby LimitProcesses 10 CgiPrefix CGI_ CgiEscape on
This configuration will run scripts and executables in the ../cgi-bin directory which should be outside the web documents directory. It is setup to handle Perl, Python, Lua and Ruby scripts. On Windows, it will run .bat and .cmd scripts. This configuration limits CGI to at most 10 simultaneous requests. CGI environment variables will be escaped for security and will have a "CGI_" prefix.
Consult the CGI Directives for more information.
FastCGI
Appweb supports FastCGI as an alternative way to run CGI programs on Unix style systems.