ok i finally got it working T_T thanks God.. everybody say yay ^^<br><br>requirement: <div>nginx or other web server with fcgi support<br><div>v8<br>v8cgi <br>spawn-fcgi <br>a js script that handle the requests, in this example /home/kyz/Projects/site/index.esp<div>
<br>======<br>init script:</div><div><br><div>#!/bin/sh</div><div>ESP_SCRIPT=&#39;/home/kyz/Projects/site/index.esp&#39;</div><div>V8C_SCRIPT=&quot;/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www-data -g www-data `which v8cgi` $ESP_SCRIPT&quot;</div>
<div>KIL_SCRIPT=&quot;killall -v -9 `which v8cgi`&quot;</div><div>RETVAL=0</div><div>case &quot;$1&quot; in</div><div>  start)</div><div>        $V8C_SCRIPT</div><div>        RETVAL=$?</div><div>        ;;</div><div>  stop)</div>
<div>        $KIL_SCRIPT</div><div>        RETVAL=$?</div><div>        ;;</div><div>  restart)</div><div>        $KIL_SCRIPT</div><div>        $V8C_SCRIPT</div><div>        RETVAL=$?</div><div>        ;;</div><div>  *)</div>
<div>        echo &quot;Usage: v8fcgi {start|stop|restart}&quot;</div><div>        exit 1</div><div>        ;;</div><div>  esac</div><div>ps aux | grep $ESP_SCRIPT | grep `which v8cgi`</div><div>exit $RETVAL</div><div><br>
</div></div><div>======</div><div>index.esp</div><div><br></div><div><div>#!/usr/local/bin/v8cgi</div><div>system.stdout(JSON.stringify(system.env));</div><div>response.write( &#39;&lt;html&gt;&lt;body&gt;&#39; );</div><div>
response.write( HTML.dump(global) ); // scary but needed for debug</div><div>response.write( &#39;&lt;/body&gt;&lt;/html&gt;&#39; );</div></div><div><br></div><div>======</div><div>nginx sites-available/default, add:</div>
<div><div>        location ~ \.(sjs|ssjs|esp)$ {</div><div>                fastcgi_pass <a href="http://127.0.0.1:9000">127.0.0.1:9000</a>;</div><div>                #fastcgi_index index.esp;    # i don&#39;t think this useful?</div>
<div>                #fastcgi_param SCRIPT_FILENAME /usr/local/www/nginx$fastcgi_script_name; # what this one for?</div><div>                include fastcgi_params;                                                 </div><div>
        }                  </div></div><div><br></div><div><br></div><div><br>On Thu, Oct 15, 2009 at 7:35 AM, Kiswono Prayogo &lt;<a href="mailto:kiswono@gmail.com">kiswono@gmail.com</a>&gt; wrote:<br>&gt; ngxv8 not good (yet), i&#39;ve tried it, and remove it immediately.. ^^<br>
&gt; yes, currently i&#39;m trying nginx_http_js_module.. thanks for your suggestions ^^<br>&gt;<br>&gt;&gt; 3.<br>&gt;&gt; nginx_http_js_module or<br>&gt;&gt; nginx_http_js_module or --&gt; typo?<br>&gt;&gt; ngxv8 ?<br>&gt;<br>
&gt; node.js --&gt; not using nginx<br>&gt; jaxer --&gt; not using nginx<br>&gt; ngxv8 --&gt; not for production<br>&gt; v8cgi --&gt; not using nginx, i will try this again..<br>&gt;<br>&gt; Regards,<br>&gt; GB<br>&gt;<br>
<br></div></div></div>