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 "=> <br/> (" localhost "=> <br/> (<br/>" socket "=>"/tmp/php-fastcgi.socket ", <br/> "bin-path" => "/usr/bin/PHP-cgi" <br/>)
Create a file test. php In the/srv/www/Lighttpd directory. The content is as follows:
<? <Br/> phpinfo (); <br/>?>
Then access: http: // localhost/test. php