OS: CentOSrelease5.5Lighttpd: 1.4.28 install sudoyuminstalllighttpd. i386lighttpd-fastcgi.i386lighttpd-mod_mysql_vhost.i386 run check profile lighttpd-t-flighttpd.conf start lighttpd service li
OS: CentOS release 5.5
Lighttpd: 1.4.28
Install
Sudo yum install lighttpd. i386 lighttpd-fastcgi.i386 lighttpd-mod_mysql_vhost.i386
Run
Check the configuration file
Lighttpd-t-f lighttpd. conf
Start the lighttpd service
Lighttpd-D-f lighttpd. conf
End lighttpd service
CTRL + C
Or use Linux system services to start and stop the lighttpd service.
/Etc/init. d/lighttpd start/stop/restart
Test
Create an index.html file in the/srv/www/lighttpddirectory. the content is as follows:
Hello Lighttpd!
Then access: http: // localhost/index.html
Configure php support
Edit the/etc/lighttpd/modules. conf file and delete the comments before the following lines.
Include "conf. d/fastcgi. conf"
Edit the/etc/lighttpd/conf. d/fastcgi. conf file and add the following lines
Fastcgi. server = (". php" =>
("Localhost" =>
(
"Socket" => "/tmp/php-fastcgi.socket ",
"Bin-path" => "/usr/bin/php-cgi"
)
)
)
Create a file test. php in the/srv/www/lighttpd Directory. the content is as follows:
Phpinfo ();
?>
Then access: http: // localhost/test. php