{{keywords>mybook world edition linux ssh lighttpd mkdir ln lighttpd.conf bin-path socket}}
====== Configure Lighttpd ======
First consider fallowing all the previous steps the [[home|WD MyBook World Edition Hacks]] tutorial
Please read the official Lighttpd documentation before proceeding. [[http://trac.lighttpd.net/trac/wiki/Docs%3AConfigurationOptions|Lighttpd Configuration Options]]
This chapter is based on Martin Hinner's hack: [[http://martin.hinner.info/mybook/lighttpd.php|Using built-in lighttpd to serve webpages]]
* Create soft-link in /usr/www/lib
# mkdir /shares/internal/PUBLIC/www/
# ln -s /shares/internal/PUBLIC/www/ /usr/www/lib/
* Edit /etc/lighttpd/lighttpd.conf
"nasMaster.pl" => (( "socket" => "/tmp/lighttpd.fcgi.socket",
"check-local" => "disable",
)),
".php" => ((
"bin-path" => "/usr/local/php5/bin/php-cgi",
"socket" => "/tmp/php.socket",
))
* Restart web server.
# /etc/init.d/lighttpd restart
* Create index.php file in /shares/internal/PUBLIC/www/ and put this line
* open web browser and navigate to:
http://DEVICE_NAME/www/index.php