<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16587" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>Dear All,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Im a System Admin from Indonesia.</FONT></DIV>
<DIV><FONT face=Arial size=2>I have a little trouble with Engine-X 
(nginx).</FONT></DIV>
<DIV><FONT face=Arial size=2>My server can recognize PHP &amp; FCGI well, but a 
trouble appear when I use a FuseBox frame work in my server.</FONT></DIV>
<DIV><FONT face=Arial size=2>I assume that the troubles are here:</FONT></DIV>
<DIV><FONT face=Arial size=2>~ when server access a page like this:</FONT></DIV>
<DIV><FONT face=Arial size=2><A 
href="">http://jkt6.detiksport.com/raket/index.php/home.read/tahun/2007/bulan/12/tgl/17/time/235133/idnews/868421/idkanal/79</A></FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Engine-X will parse that as folder (identified by 
slash (/)), but that doesn't really a folder. Those are a fuseBox parsing 
methode.</FONT></DIV>
<DIV><FONT face=Arial size=2>I run this application in Apache, and everything 
going well.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>What should I do&nbsp; ?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>This is my nginx.conf and spawn-php.sh 
config:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>---------------------------------------------nginx.conf--------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2>user&nbsp; detik users;<BR>worker_processes&nbsp; 
10;<BR>pid /var/run/nginx.pid;<BR>events {<BR>&nbsp; worker_connections 
1024;<BR>}<BR>http {<BR>&nbsp; include 
/usr/local/nginx/conf/mime.types;<BR>&nbsp; default_type&nbsp; 
application/octet-stream;<BR>&nbsp; log_format main '$remote_addr - $remote_user 
[$time_local] 
'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
'"$request" $status $body_bytes_sent "$http_referer" 
'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
'"$http_user_agent" "$http_x_forwarded_for"';<BR>&nbsp; sendfile on;<BR>&nbsp; 
tcp_nopush&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; on;<BR>&nbsp; 
tcp_nodelay&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; off;<BR>&nbsp; 
gzip&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
on;<BR>&nbsp; gzip_http_version 1.0;<BR>&nbsp; gzip_comp_level 2;<BR>&nbsp; 
gzip_proxied any;<BR>&nbsp; gzip_types&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; text/plain 
text/html text/css application/x-javascript text/xml application/xml 
application/xml+rss text/javascript;<BR>&nbsp; server {<BR>&nbsp;&nbsp;&nbsp; 
listen 202.158.66.30:80;<BR>&nbsp;&nbsp;&nbsp; client_max_body_size 
50M;<BR>&nbsp;&nbsp;&nbsp; #server_name <A 
href="">www.rubyonrailsworkshops.com</A> 
rubyonrailsworkshops.com;<BR>&nbsp;&nbsp;&nbsp; # doc root<BR>&nbsp;&nbsp;&nbsp; 
root /data/labdetiksport/site/sport;<BR>&nbsp;&nbsp;&nbsp; #access_log&nbsp; 
/var/log/nginx.vhost.access.log&nbsp; main;<BR>&nbsp;&nbsp;&nbsp; 
access_log&nbsp; /var/log/httpd/jkt6.detiksport-access.log&nbsp; 
main;<BR>&nbsp;&nbsp;&nbsp; error_log /var/log/httpd/jkt6.detiksport-error.log 
debug;<BR>&nbsp;&nbsp;&nbsp; if (-f $document_root/system/maintenance.html) 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rewrite&nbsp; ^(.*)$&nbsp; 
/system/maintenance.html last;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
break;<BR>&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; location / 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; proxy_set_header&nbsp; X-Real-IP&nbsp; 
$remote_addr;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # If the file exists as a static 
file serve it directly without<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # running all 
the other rewite tests on it<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (-f 
$request_filename) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # check for 
index.html for directory index<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # if its there 
on the filesystem then rewite<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # the url to add 
/index.html to the end of it<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # and then break 
to send it to the next config rules.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (-f 
$request_filename/index.html) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
rewrite (.*) $1/index.html break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
}</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Look for existence 
of PHP index file.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # Don't break here...just 
rewrite it.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (-f 
$request_filename/index.php) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
rewrite (.*) $1/index.php;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # this is the meat 
of the rails page caching config<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # it adds 
.html to the end of the url and then checks<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # 
the filesystem for that file. If it exists, then 
we<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # rewite the url to have explicit .html on 
the end<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # and then send it on its way to the 
next config rule.<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # if there is no file on the 
fs then it sets all the<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # necessary headers 
and proxies to our upstream mongrels<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (-f 
$request_filename.html) {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; rewrite 
(.*) $1.html break;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<BR>&nbsp;&nbsp;&nbsp; 
}<BR>&nbsp;&nbsp;&nbsp; location /content_images/ 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; alias 
/data/images/;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; error_page&nbsp;&nbsp; 500 502 
503 504&nbsp; /500.html;<BR>&nbsp;&nbsp;&nbsp; location = /500.html 
{<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; root&nbsp;&nbsp; 
/data/labdetiksport/site/sport;<BR>&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp; # Pass the PHP scripts to 
FastCGI server listening on ip:port.<BR>&nbsp;&nbsp;&nbsp; 
#<BR>&nbsp;&nbsp;&nbsp; # Requires you to start one instance of <A 
href="">http://topfunky.net/svn/shovel/nginx/php-fastcgi.sh</A><BR>&nbsp;&nbsp;&nbsp; 
location ~ \.php$ {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
fastcgi_pass&nbsp;&nbsp; 
127.0.0.1:9000;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
fastcgi_index&nbsp; index.php;</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
fastcgi_param&nbsp; SCRIPT_FILENAME&nbsp; 
/data/labdetiksport/site/sport$fastcgi_script_name;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
include 
/usr/local/nginx/conf/fastcgi.conf;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
#fastcgi_param&nbsp; QUERY_STRING&nbsp;&nbsp;&nbsp;&nbsp; 
$query_string;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
#fastcgi_param&nbsp; REQUEST_METHOD&nbsp;&nbsp; 
$request_method;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
#fastcgi_param&nbsp; CONTENT_TYPE&nbsp;&nbsp;&nbsp;&nbsp; 
$content_type;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
#fastcgi_param&nbsp; CONTENT_LENGTH&nbsp;&nbsp; 
$content_length;<BR>&nbsp;&nbsp;&nbsp; }</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp; }</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>}<BR>----------------------------------------------------------end of 
nginx.conf-----------------------------------------------</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2><FONT face=Arial 
size=2><BR>----------------------------------------------------------spawn-php.sh-----------------------------------------------</FONT></DIV></FONT>
<DIV><FONT face=Arial size=2>#!/bin/bash</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2># Description: PHP-FastCgi start script from <A 
href="">http://blog.kovyrin.net/2006/05/30/nginx-php-fastcgi-howto/</A><BR>#<BR># 
Author: Alexey Kovyrin <A href="">http://blog.kovyrin.net</A><BR># Comments by: 
Geoffrey Grosenbach <A href="">http://topfunky.com</A><BR>#<BR># This script is 
started once and receives PHP requests from Nginx for<BR># all apps. The Nginx 
config passes the full path to the script being requested, so<BR># only one 
fastcgi runner is needed for all apps, virtual hosts, etc.<BR>#<BR># See also 
the init.d script for starting this on boot.<BR>#<BR># To install PHP, I had to 
also compile the following:<BR>#<BR>#&nbsp;&nbsp; * <A 
href="">http://www.gnu.org/software/m4/</A><BR>#&nbsp;&nbsp; * <A 
href="">http://flex.sourceforge.net/</A><BR>#&nbsp;&nbsp; * <A 
href="">http://php.net/</A> with './configure --prefix=/usr/local 
--enable-fastcgi'</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>## ABSOLUTE path to the PHP 
binary<BR>PHPFCGI="/usr/local/bin/php"</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>## tcp-port to bind 
on<BR>FCGIPORT="9000"</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>## IP to bind 
on<BR>FCGIADDR="127.0.0.1"</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>## number of PHP children to 
spawn<BR>PHP_FCGI_CHILDREN=5</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>## number of request before php-process will be 
restarted<BR>PHP_FCGI_MAX_REQUESTS=1000</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2># allowed environment variables sperated by 
spaces<BR>ALLOWED_ENV="PATH USER"</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>## if this script is run as root switch to the 
following user<BR>USERID=detik<BR>GROUPID=users</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>################## no config below this 
line</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>if test x$PHP_FCGI_CHILDREN = x; then<BR>&nbsp; 
PHP_FCGI_CHILDREN=5<BR>fi</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>ALLOWED_ENV="$ALLOWED_ENV 
PHP_FCGI_CHILDREN"<BR>ALLOWED_ENV="$ALLOWED_ENV 
PHP_FCGI_MAX_REQUESTS"<BR>ALLOWED_ENV="$ALLOWED_ENV 
FCGI_WEB_SERVER_ADDRS"</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>if test x$UID = x0; then<BR>#&nbsp; EX="/bin/su -m 
-c \"$PHPFCGI -q -b $FCGIADDR:$FCGIPORT\" $USERID"<BR>&nbsp; 
EX="/usr/local/bin/php -q -b 127.0.0.1:9000 detik"<BR>else<BR>&nbsp; 
EX="$PHPFCGI -b $FCGIADDR:$FCGIPORT"<BR>fi</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>echo $EX</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2># copy the allowed environment 
variables<BR>E=</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>for i in $ALLOWED_ENV; do<BR>&nbsp; E="$E 
$i=${!i}"<BR>done</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2># clean environment and set up a new one<BR>nohup 
env - $E sh -c "$EX" &amp;&gt; /dev/null &amp;<BR></FONT></DIV>
<DIV><FONT face=Arial size=2><FONT face=Arial size=2><FONT face=Arial size=2>
<DIV><BR>----------------------------------------------------------end of 
spawn-php.sh-----------------------------------------------</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>Thank you very much for your kind attentions.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>best regards,</DIV>
<DIV><STRONG>Dika</STRONG></DIV>
<DIV>.indonesian</FONT></DIV></FONT></DIV></FONT></FONT></DIV></BODY></HTML>