Goodbye, Apache; hello, lighttpd!

Fed up with how Apache memory usage grows (and grows, and grows), I’ve changed all of my sites on my external server (where, for instance, this very blog is hosted) to lighttpd, a.k.a. Lighty.

I began by changing the most problematic site to Lighty (listening on port 81), and using Apache’s proxy module to redirect it there. After the results were promising, I went and changed each site at a time, dealing with the particular problems of each (I use lots of redirects, and the syntax is a bit different, and, furthermore, Lighty doesn’t support .htaccess files.

WordPress was relatively easy (just one line). MyBB would have been even easier (nothing to do), if not for the fact that I use an SEO mod which uses an .htaccess file for nicer URLs. But everything was easier than I expected.

After each site had been “moved”, it was just a matter of stopping Apache and moving Lighty to port 80.

Memory usage is way down, and so is swap file usage (basically, it’s not being used, and it was, before — a lot). Barring any future problems, I’m quite happy with this set-up, and would advise this change to anyone who’s never tried anything other than Apache on an Unix system. I’ll probably try doing the same thing on my home server, too.

Tags: , , , ,

4 Responses to “Goodbye, Apache; hello, lighttpd!”

  1. Alcides says:

    Is there any how to make lighttp read the htaccess? I’ve seen a module that does the same for IIS, just wondering…

    Without that, most of my apps wont run :/

  2. Not that I know of. I’ve had success converting .htaccess files to directives in the lighttpd config file, but, of course, that won’t work for apps that change their own .htaccess file…

  3. Been down this path, and eventually returned to Apache. Apache modules are just too powerful not to miss them in lighty. My final setup, which I shall eventually describe in my blog, is a streamlined frontend apache, running the new event MPM, and a backend apache with the prefork MPM and all bells and wistles. Each server can handle a couple million pageviews per day, with peaks of 30 frontend processes and 5 backend processes. Under static content request loads, servers can easily serve ten times this load with no stress. Frontend processes average about 15Mb RSS usage.

    Bonus with this setup: mod_rewrite (the real voodoo one, not lighty’s stripped version) and the fabulous mod_cache. Oh, and a clean separation between static content and dynamic content servers.

  4. mic says:

    Hello, may you share how you converted the wordpress .htaccess file?


Leave a Reply

Sore Throat

It is a very attractive website built using wonderful features based in Wordpress. It is an informative health care blog regarding:


You can learn more about Simvastatin or Zocor which treats triglyceride and high cholesterol levels in blood. You might need medical attention for Simvastatin side effects.


As a beta blocker Atenolol is a drug used primarily in cardiovascular diseases. Be careful! Please be informed about Atenolol side effects.


It is a receptor blocker used in treatment of several diseases of the cardiovascular system, especially hypertension. Metoprolol side effects must be considered for this drug.


Known also as Yasmin is used for ovulation prevention. Before taking it, read Yaz side effects.


Also known as Sertraline is an antidepressant of the selective serotonin reuptake inhibitor. Consider the related topics:

Do not forget to read also Zoloft side effects since it is well described.


It is used in treatment of hypertension. Before using Lisinopril please refer to Lisinopril side effects to avoid heart problems.


Is an antidepressant medication that belongs to the group of drugs called selective serotonin reuptake inhibitors. Before using Citalopram please refer to Citalopram side effects to avoid problems.

Drug addiction

Be informed for drug addiction facts, drug addiction treatment, drug addicts. Look also for a rehab for heroin and cocaine or other drugs