Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to get some feedback about a migration From Apache to nginx. My goal is to reduce the memory footprint of the web server. Currently, I use the following modules.features on Apache:

  • multiple virtual hosts
  • Server Side Include
  • Fast CGI

Please share your experience: problems during migration, benefits after migration (was it worth it?), useful modules for nginx, etc.

share|improve this question
up vote 5 down vote accepted

In my experience, it is well worth it. Take for example, a Magento store (which is well known for being slow in general). I was able to get an over 100% improvement in response time by switching to nginx + php-fcgi/php-fpm + apc. At this point, unless there is a must have feature in Apache that is not available elsewhere (I doubt this will really happen in practice), I would always go with an nginx based config.

Here's my writeup for Magento. HTH.

share|improve this answer

All of the features you list are supported by Nginx out of the box:

We use a gross combination of Lighttpd, Apache and Nginx at work. We can't get rid of Apache entirely because we're running a couple custom modules for it (a hacked mod_pubcookie, among others) and it'd be a pain to port them over to Lighttpd/Nginx.

I used to use Lighttpd as our de-facto lightweight content server, but have hit numerous snags with its FreeBSD implementation (it seems to break when using FreeBSD's sendfile/kqueue syscalls - and when it breaks it takes the whole server down with it). I've never had any issues with Nginx, and have been slowly replacing all our Lighttpd installs with it. Nginx has been rock solid in our deployment.

The one issue that I have had with Nginx is that its documentation isn't well-indexed by Google, so you have to go directly to their site to look up stuff. Despite that, all the documentation is organized in a manner which makes sense to me, so it's not too hard to find what I need.

share|improve this answer

I'm afraid I don't have experience of nginx, only apache and lighttpd. We replaced 110 copies of apache running as different users for customer PHP applications with a single instance of lighttpd and 110 PHP processes connected via FastCGI. The configuration was considerably less, memory usage lower and probably faster. In this particular instance, the PHP applications weren't directly accessible via the internet. I'm uncertain as to whether we would do that. We know what we're doing with Apache; we've had a lot of experience with it. I My impressions are that Apache is very flexible, but you pay for that with a larger slower process. I'd use lighttpd and nginx where we didn't need that flexibility. I appreciate this probably hasn't really answered your question.

share|improve this answer

NginX vs LiteSpeed: Magento Benchmark Tests

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.