L2MP (Linux + Lighttpd + MySQL + PHP) uses lightweight lighttpd as a Web server. Although the name is not as loud as Apache, there are many websites built with it, such: sourceforge, Meebo, Douban, and Maoyan broadband. Lighttpd is known for its security, speed, and low memory consumption. It is also specially optimized for large-scale distributed connection environments and is widely used on websites based on AJAX or RubyonRails applications.
L2MP (Linux + Lighttpd + MySQL + PHP) uses lightweight lighttpd as a Web server. Although the name is not as loud as Apache, there are many websites built with it, such: sourceforge, Meebo, Douban, and Maoyan broadband. Lighttpd is known for its security, speed, and low memory consumption. It is also specially optimized for large-scale distributed connection environments and is widely used on websites based on AJAX or Ruby on Rails Applications.
Description: lighttpd is an open-source software developed by Germans. Its fundamental purpose is to provide a secure, fast, compatible, and flexible Web Server environment for high-performance websites. It features low memory overhead, low CPU usage, good performance, and rich modules. Lighttpd is one of the many lightweight OpenSource Web servers. It supports FastCGI, CGI, Auth, output compress, URL rewriting, Alias, and other important functions, apache is popular because of its rich functions. Many functions are implemented in lighttpd, which is very important to Apache users, because the migration to lighttpd must face these problems.
Next we will introduce how to quickly build an L2MP Web server using lighttpd on Ubuntu.
1. Install Lighttpd + MySQL + PHP5
Sudo apt-get install lighttpd mysql-server php5-cgi phpmyadmin
2. Configure 10-fastcgi.conf
Back up first
Sudo cp/etc/lighttpd/conf-available/10-fastcgi.conf/etc/lighttpd/conf-available/10-fastcgi.conf.bak
Then, Edit
Sudo gedit/etc/lighttpd/conf-available/10-fastcgi.conf
Delete the original content and replace it with the following content.
Server. modules + = ("mod_fastcgi ")
Fastcgi. server = (". php" =>
("Localhost" =>
("Socket" => "/tmp/php5-fcgi.socket ",
"Bin-path" => "/usr/bin/php5-cgi ")))
3. Enable fastCGI
Sudo lighty-enable-mod fastcgi
4. Restart the server
Sudo/etc/init. d/lighttpd restart
Now, you can use http: // localhost/to browse the website running on lighttpd. The above method is tested on Ubuntu Edgy and Feisty. Remember the following commands and positions.
Sudo/etc/init. d/lighttpd restart (restart lighttpd)
Sudo gedit/etc/lighttpd. conf (configure lighttpd)
Sudo gedit/etc/php5/cgi/php. ini (configure PHP)
Sudo gedit/etc/mysql/my. cnf (configure MySQL)
/Var/www/(home directory location)
This article comes from:Http://www.osxcn.com/ubuntu/build-a-l2mp-server-with-ubuntu.html