Is Nginx replacing Apache?
I've always used Apache for virtual hosting.
Is Nginx replacing Apache as the web server of choice? Is it the 'future?'
Is there any reason to change from Apache to Nginx for low-traffic mostly static sites?
Can Apache and Nginx co-exist on same Linode? If so, how will a Linode (Ubnutu) know which one to respond with on site requests (port 80)? Maybe change something ("listening?") in the config file?
5 Replies
Is Nginx replacing Apache as the web server of choice? Is it the 'future?'
No…not unless a third of all the websites in the world decide to deploy something else. If you're asking this question after reading some meaningless poll, consider the source…
Is there any reason to change from Apache to Nginx for low-traffic mostly static sites?
No.
Can Apache and Nginx co-exist on same Linode?
Yes.
If so, how will a Linode (Ubnutu) know which one to respond with on site requests (port 80)? Maybe change something ("listening?") in the config file?
apache2 & nginx cannot both listen on port 80. The one you start up second will error out because TCP port 80 is busy (assuming the first one started successfully). This is a TCP phenomenon and has nothing to do with either apache2 or nginx.
If you want to run them both, use port 8080 or some such for nginx. Beware, the configuration model for nginx is VERY DIFFERENT from apache2!
-- sw
I've never had an issue with Apache and I like its ability to have directory directives via .htaccess files. You don't get that in Nginx.. it all goes into the "sites available" files… and I still can't figure out how to do a 301 redirect into a subdirectory off of the domain root directory. Always build out websites in a subdirectory or perhaps a subdomain. The 301 is simple to do in Apache. I'd have to Google for it if I ever move to Nginx.
All my developer friends use Nginx so I thought maybe I'm being left behind here!!
Thanks for your posting. You are a valued resource to us.
nginx is newer than apache2…and was designed from the ground up to be multi-threaded. There's possibly an argument to be made that nginx has better performance but this claim, also, is very subjective and, unless your workload exactly matches that of the claimant, the argument is most likely bull pucky.
The best web server to use is the one you know and the one that gives you the best performance based on your workload. Don't forget that ease of configuration counts too -- your time in initial config and ongoing maintenance is perhaps the biggest cost in any endeavor like this.
apache2 has been around for a long time. It's battle-tested…under all kinds of circumstances. Lots of people depend on it. It's easy to configure (IMHO) and well-documented. There's tons of info and tribal knowledge about it. apache2 is not going away…at least not in yours or my lifetimes.
-- sw
apache2 is not going away…at least not in yours or my lifetimes.
Well, surely not in my lifetime. I'm 74 and that is close to… dead!
My wife says that if I were an alligator that I'd be a pair of Prada shoes by now!
Well, surely not in my lifetime. I'm 74 and that is close to… dead!
Well, I'm not that far behind (70). I've been a Unix user since the Bell Labs 6th Edition (when Jobs, Woz & Gates were all gleams or little tykes)…except for brief detours into a proprietary real-time OS and Windoze NT (with which I used the MKS Toolkit…which made WNT look like a Unix system -- shell, familiar tools, etc).
I believe 6th Edition was the first Unix that ATT commercially licensed (for like $20K). It was still freely licensed to educational institutions (like all previous editions). It came to you on a DECtape (it only ran on PDP-11s) in a package with paper documentation produced by troff. You had to be very astute to divine the abstract truth of the words written by Kernighan, Ritchie, Thompson, Aho, et al…
Linux users don't know how good they have it ;-)
-- sw