2009/02/03

lighttp in FreeBSD

cd /usr/ports/www/lighttp/
make install clean

config /usr/local/etc/lighttpd.conf:
server.modules  =(
.....
#enable mod_fastcgi
         "mod_fastcgi",
.....
)

.....

#enable PHP
fastcgi.server             = ( ".php" =>
                               ( "localhost" =>
                                 (
                                   "socket" => "/var/run/lighttpd/php-fastcgi.socket",
                                   "bin-path" => "/usr/local/bin/php-cgi"
                                 )
                               )
                            )

Notice:replace "php-cgi-cgi" to "php-cgi"

Then create tmp folder:
mkdir /var/run/lighttpd
chown www:www /var/run/lighttpd


參考資料:
Weithenn Study Daily: LigHttpd-輕量級 Web Server

沒有留言:

張貼留言