I will do this i quick steps.
Install Lighttpd:
ipkg install lighttpd
Install Fast-CGI
Code:
ipkg install php-fcgi
Then you edit /opt/etc/lighttpd/lighttpd.conf
(I Use Joe editor so if you havnet install it do it by: "")
Code:
joe /opt/etc/lighttpd/lighttpd.conf
now start removing the # from
Change
server.document-root
to something like:
Code:
server.document-root = "/opt/share/www/"
change the accesslog.filename
to something like:
#### accesslog module
Code:
accesslog.filename = "/opt/share/www/log/access.log"
Add ".sqlite" to:
Code:
url.access-deny = ( "~", ".inc",".sqlite" )
Now the most importent thing is to change the FastCGI setting to this:
Code:
fastcgi.server = ( ".php" =>
((
"host" => "192.168.1.1",
"port" => 1026,
))
)
Hit to save and exit
Next thing is to create the file
/opt/etc/init.d/S45php
So you make the file by doing
Code:
joe /opt/etc/init.d/S45php
and you put the following in it:
Code:
#!/bin/sh
export PHP_FCGI_CHILDREN=1
PORT=1026
BIN=/opt/bin/php-fcgi
#/opt/etc/php.d
case $1 in
start)
$BIN -b $PORT &
;;
stop)
kill Pidof phpM ;;
*)
echo "usage: $0 (start|stop)"
exit 1
esac
Save and exit: ""
Change the permission on it to make it executable:
Now you can start it by:
or it will start when you reboot the next time
Thanks goes to Macsat for helping me to get it working on my unit