Re: fcgi
Aaron Schrab <[email protected]> Thu, 5 Jan 2006 20:03:31 -0600
| Newsgroups | gmane.comp.apache.mod-ruby |
|---|---|
| Message-ID | <[email protected]> |
At 18:28 +0900 05 Jan 2006, Shugo Maeda <[email protected]> wrote: > At 12/16/05 10:31:41 (JST), > Daniel Bretoi <[email protected]> wrote: > > does eruby support fcgi? > > Sorry, no. While it may not be "supported", it's certainly possible to use eruby with fcgi. I've played with having eruby files like the one attached executed as fcgi executables, and it worked fairly well. You could also have a simple fcgi script that can load any of a number of eruby files. It should also be possible to use an fcgi script as an Apache handler for eruby files.
foo.html
(text/plain, 254 B)
#!/usr/bin/eruby
% require 'fcgi'
% FCGI.each_cgi do |cgi|
<%= cgi.header %>
<html>
<head>
<title>Test</title>
</head>
<body>
Hi there<br>
Referrer was <%= cgi.referer %><br>
Var was <%= cgi['var'] %><br>
</body>
</html>
% end