Lighttpd Versus Apache2

June 13, 2008

Do you run a LAMP or a LLMP? When I jumped into the server realm I thought that Apache was the natural/right choice to use for my webserver. I found out that this isn’t necessarily true as Apache has some worthy competitors. A very popular one is called lighttpd and it is freely available for download and use. If you run an Ubuntu server like I do, lighttpd is in the repositories and is an easy install/setup.

After reading some blog and forum entries on the Apache versus lighttpd issue, I stumbled across someone who had actually taken the time to speed test different file size transmission rates on both webservers. It turns out that lighttpd can serve pages faster than Apache2. In some cases it was much, much faster. Therefore, I decided to change my LAMP to a LLMP. To accomplish this I had to remove Apache2, install lighttpd, and then configure CGI correctly. As you can see by the following entries, the change was simple and painless for me.

In the terminal, I ran through these four commands:
1) sudo aptitude remove apache2.2-common
2) sudo aptitude install lighttpd
3) sudo lighty-enable-mod cgi
4) sudo /etc/init.d/lighttpd force-reload

If you decide to go this route, you can test to see if lighttpd is now working. All you have to do is open your web browser (hopefully Firefox) and go to your localhost address (http://localhost/). You should see the lighttpd hold page instead of the Apache2 ‘It Works’ page. If so, you are golden! Happy lighttpd serving.

Entry Filed under: Internet, Linux, Servers, Ubuntu. .

Leave a Comment

Required

Required, hidden

Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Trackback this post  |  Subscribe to the comments via RSS Feed


Categories

RSS Twitter

Blogroll