Migrate from Apache2 to nginx?

ubuntumatthew

Bubblehead Star Child
Joined
Mar 24, 2007
Messages
208
I'm working within some strict hardware restraints on a specific project and need to minimize the amount of memory being used by my webserver. Right now I'm using Apache 2. I like it. I'm comfortable with it because I know it pretty well. However, after doing all the configuration I can it is right at the border of what I am comfortable with.

I've been doing some reading about nginx and it sounds incredibly promising. I realize I'll have to do some behind-the-scenes configuration work to make the switch, and that seems tedious. I can do it, I'm just not quite sure I want to yet.

So, finally, to the question...

Has anyone here ever switched a site from Apache2 to nginx? Was it worth it to you? Why? Any gotchas I should watch out for if I decide to make the switch?

EDIT: I should mention, this is on a server that I have root access to, so I am not constrained by a web hosting company's limits, just my knowledge, capabilities and finances. No physical upgrades are possible at this moment...a memory upgrade would solve the whole thing, but that's not in the cards right now. I'm looking for a software or configuration solution.
 

ubuntumatthew

Bubblehead Star Child
Joined
Mar 24, 2007
Messages
208
Update: I decided to make the switch and I couldn't be happier. nginx is FAST!! It uses less memory, too. (And this is being said by someone who knows and likes Apache.)
 

MPerryman

Enthusiast
Joined
Jul 7, 2007
Messages
126
Feature-wise, how does it compare to Apache? And will I have to learn a whole new set of commands (I realize the answer is probably 'yes')? I only recently became familiar with mod_rewrite and basic httpd.conf configuration, let alone the other stuff, haha
 

ubuntumatthew

Bubblehead Star Child
Joined
Mar 24, 2007
Messages
208
If you do a lot of rewriting, it will either require a lot of reading and learning, or in some cases just can't be done.

Otherwise, I have found it to be pretty easy to set up and run. The only thing is that the documentation isn't nearly as good or complete as with Apache, so you may end up doing some Google searching.

On the positive side, it is a lot faster and able to handle far more consecutive requests with much, much less memory usage. I'm impressed!

So far, the best info I have found is on these two sites:
http://wiki.codemongers.com/Main
http://articles.slicehost.com/sitemap
 

ubuntumatthew

Bubblehead Star Child
Joined
Mar 24, 2007
Messages
208
In terms of performance, they are similar.

The main difference, as far as I can tell, is the licensing. Lightspeed is free to use (in the standard version, with a fuller featured enterprise version available for payment), but uses a limited-use proprietary license, while nginx's full version is free in cost and also uses a free BSD style license.

That might not matter for most people. It mattered to me. :)
 

MPerryman

Enthusiast
Joined
Jul 7, 2007
Messages
126
You open-source guys and your licensing :tiphat:

Looks like I've got yet another piece of software to dl now.
 

Baldilocks

Fanatic
Joined
Jan 27, 2008
Messages
3,501
Yeah. I am using lightspeed now instead of Apache (with URLJet). Server load times are MUCH improved.
 

Mosss

Enthusiast
Joined
Nov 5, 2007
Messages
216
Well, I have been using simplehelix.com services for about 4 months and I should say that it has Litespeed server which is 5 times faster than Apache and Zeus. I have unmatched speed connection and really satisfied with it.
 

ubuntumatthew

Bubblehead Star Child
Joined
Mar 24, 2007
Messages
208
Yeah. I am using lightspeed now instead of Apache (with URLJet). Server load times are MUCH improved.

Well, I have been using simplehelix.com services for about 4 months and I should say that it has Litespeed server which is 5 times faster than Apache and Zeus. I have unmatched speed connection and really satisfied with it.
I have heard nothing but good about Lightspeed in use.
 

peachy

Neophyte
Joined
Oct 10, 2008
Messages
3
Hi guys, I'd recommend you check out Cherokee too. It's lightweight, very fast and stable. It's also pretty resilient and due to the way it self monitors the webserver process and fast-cgi server. An added bonus for those on Ubuntu server is that they maintain packages for Ubuntu that are always up to date (although not in the official repos).

Downside it that you will have to spend some time on URL rewrites, not because it is broken or difficult just because it is different. I noticed mention of Apache migration scripts recently on the mail list too.
 

el canadiano

But I said ███████████
Joined
Sep 1, 2008
Messages
843
Are you fully using NginX? I know of a person who actually uses a hybrid of NginX and Apache.
 

ferodynamics

Neophyte
Joined
Oct 30, 2010
Messages
1
I'm using NginX here, mostly WordPress installs. I admit, not having ".htaccess" is a bit frightening at first. But once you're past that learning curve, it's smooth sailing. To serve a typical blog post takes Nginx less than one-hundredth of a second on my VPS.
 

Supermighty

Adherent
Joined
Apr 10, 2009
Messages
345
How easy was nginx to learn coming from apache2?

How does it handle php or fastcgi?
 

WebhostGIANT_Rob

Adherent
Joined
Mar 15, 2010
Messages
365
I think that is very important to do the following: test both and then decide. Of course if you have such opportunity to test.
 
Top