nginx or Apache for Beginner?

King of Heroes

[H]ard|Gawd
Joined
Mar 26, 2008
Messages
2,006
I'm setting up a Linux server on my internal network for personal and professional use. Primarily for practice, PHP development (thats the professional part), and for trying new things as far as web dev goes (Ruby on Rails, Python, etc). Right now the hardware is an old Dell Inspiron business laptop. It has a Core 2 T7200, 2GB of DDR2-533 (or 667, I'm not sure), and an 80GB hard drive. I've been considering what web server to use and I know nginx and Apache are the 2 biggest names right now. I just wanted to quickly gauge opinions on what would be best for someone like me, who has never managed a web server before.

Apache is by far the most popular, but it has a ton of options that I probably won't need. My job uses Apache (which is a big point in its favor), but since most of my job related stuff is (currently) on the scripting side, it shouldn't really matter what web server I use I think. My main concern with Apache is that its rather resource intensive I believe. At the very least, my little laptop server might not be able to hande it all that well?

nginx I've read performs alot better than Apache, but I suspect I'll only notice the difference with tens of thousands of requests. Which is unlikely to happen on my home network which only I use. I think the main point in nginx's favor is that it sips resources, so its probably better suited for the hardware I have available.

Any opinions? Or am I just making this needlessly complicated?
 
I'd go with Apache as it's more widely known and used. And if your job uses it may as well try to make the environment close to what your work one is. Your laptop will run it fine. I run it on an Atom box along with a bunch of other stuff and it runs fine. With low traffic it does not really matter.
 
Apache would run fine on that machine. I learned with Apache when I was first starting out (using old Pentium 200's), so I would recommend that. It's easy to find any documentation or help with it. I haven't used nginx, so I don't have any opinion on that. But, since your job uses Apache, might as well go with that to be familiar with it.

Hardware won't be an issue unless you are going to run it online with lots of users. Hell, a P3 would work fine with 256 MB RAM as long as you don't have a lot of DB queries.
 
Since you are going to be working with PHP, stick with Apache. Most Nginx installations still pass PHP code off to an Apache backend for processing.
 
I like nginx but it might be language specific. I do most of my development with node and use nginx to serve static files as well as act as a reverse proxy for my node apps.

I find the conf files from nginx to be a joy to work with too compared to apache.
 
Looks like I'll be sticking with Apache, most Linux distros ship with that by default anyway. May mess around with nginx later as a reverse proxy.

This is completely off-topic, but can any Linux distro be used as the L in LAMP? Linux Mint was recommended to me by a friend of mine, but I always thought that was more of a desktop distro than a server one. Does it not really matter for me?
 
Any Linux distro should do. I personally like the Red Hat based ones like CentOS and Fedora.
 
I like CentOS, as well. But, Debian works just as good. Any one will work. Some may require a little different configuration, but not that bad.
 
It really just comes down to your personal preferences when it comes to package management when you go to pick the distro.
 
Apache is fine, we have almost a hundred thousand users on our Rails apps and we only have 7GB of RAM in that server, and older Xeon CPU. Pretty sure your practice/learning apps will be just fine.

You can also get a VPS with Rails/PHP all setup to go for like $10/month and work from there.
 
Go with Apache or if in case you want something light and fast, download the basic version of Litespeed server. It is easy to manage, picks up apache configuration and there is no need to change any rewrite rules for it.
 
Back
Top