6 ms·
People have been and still do exactly the same thing with Apache, this isn't unique to Nginx in any way.
by gnaritas 13y ago
People have been and still do exactly the same thing with Apache, this isn't unique to Nginx in any way.
- jh3 13y agoHe did start his comment with "For my style of coding". Maybe it's just simpler to configure these rules in Nginx than it is in Apache for lkrubner.
- gnaritas 13y agoThe problem is that he says Nginx enabled fast reverse proxy and that's just not true, nothing he described was enabled by Nginx, that was how people already did things in Apache. Apache is not hard to configure, it would support his style of coding just fine and very likely work just as well as Nginx for him. The problem people have with Apache usually isn't really apache, it's with PHP forcing them to use the process based mpm which makes it a pig. This is PHP's fault, not Apache's. use the threaded or evened worker mpm's and it's not a pig at all.
- hardwaresofton 13y agoYes. It is remarkably simple to set up reverse proxies in nginx. It is also remarkably easy to set up SSL (minus generating certificates) -- it's only 3 lines.
- gnaritas 13y agoIt's just as easy in Apache.
- Helianthus 13y ago...No it isn't. It might be 'simple' for you, and it might be readily configurable once you know how to do it, but that doesn't make it easy. I really can't tell if you're being deliberately obtuse about this. Don't you see all the people going "Yeah, it was faster to do this with nginx than it was with Apache"? Are you the sort of person that's surprised PHP got so popular?
- troels 13y agoOh, come on. It's pretty simple. You google a bit around for it and find some 3 year old blog post that tells you what to do. You'd probably have to do the same for nginx anyway. I prefer nginx' configuration syntax over apache's though.
- Helianthus 13y ago... hahaha exactly. I didn't say it wasn't simple. But simple is just sufficiently managed complexity.
- hardwaresofton 13y agoI'd like to point out that my first point was specifically towards reverse proxying... This page should be all the proof I need: http://www.apachetutor.org/admin/reverseproxies http://www.apachetutor.org/admin/reverseproxies where as reverse proxies in nginx: http://www.cyberciti.biz/tips/using-nginx-as-reverse-proxy.html http://www.cyberciti.biz/tips/using-nginx-as-reverse-proxy.h... So maybe you could make a case for nginx being less modular (or obviously so) -- but 1 config files with the right magic spell beats downloading x module and setting up x directory PLUS the magic file. Also, I think that in general, nginx fits more into the many-apps-different-implementations-same-server vision of the modern day web app.
- troels 13y agoThat would be pretty bad proof though. If you ignore the chit-chat, which is just the authors writing style, and the ugly colour scheme, the essential part is here: http://www.apachetutor.org/admin/reverseproxies#d13 http://www.apachetutor.org/admin/reverseproxies#d13 That's 26 lines of configuration, compared to the nginx example, which is 54 lines. Both are kind of arcane looking, if you haven't used it before.
- hardwaresofton 13y agooh but what about installing the modules/files that are getting loaded? True, they're not night and day, but it's still stuff to do. Also, the page I sent, the actual reverse proxy is only 14 lines, half of it is extra stuff... The section where it says "start with example.com". And that's the whole server, whereas the
- nawitus 13y agoIt is definately simpler to configure Nginx to reverse proxy, Apache needs a few more lines of configuration.
- jebblue 13y agoFrom http://httpd.apache.org/docs/2.2/mod/mod_proxy.html http://httpd.apache.org/docs/2.2/mod/mod_proxy.html: ProxyPass /foo http://foo.example.com/bar http://foo.example.com/bar ProxyPassReverse /foo http://foo.example.com/bar http://foo.example.com/bar I've used it for years, it's not hard.
- nawitus 13y agoI was talking about installing Apache and setting it up as a reverse proxy vs. installing Nginx and setting it up as a reverse proxy. Nginx takes less configuration in that scenario. I've done both and neither are hard, but nginx is slightly easier.
- gnaritas 13y agoInstalling Apache is a single command, enabling mod proxy is a single command and two lines of config. So yes, they are both trivially simple to do, even if Nginx is slightly simpler. Neither should be seen as a barrier of complexity.
- MatthewPhillips 13y agoFor the simple case Apache is only 2 lines. Nginx requires more, because Apache automatically sets the proxy headers and Nginx does not.
- insertnickname 13y agohttp://d-e-f-i-n-i-t-e-l-y.com/ http://d-e-f-i-n-i-t-e-l-y.com/
- eksith 13y agoExcept the configuration is far simpler with Nginx. What's more, you can even couple this with upstream weighted loadbalancing or round-robin which is terribly awkward without modules on Apache. Edit: Not to mention sticky sessions per proxy which simplifies user management.
- gnaritas 13y agoSimpler, yes, that doesn't make Apache complicated. They're all simple. To say without modules makes no sense, modules are how Apache does features and the mod balance module makes all of that simple including sticky sessions. If you can write code, you can configure Apache easily.
- eksith 13y ago"Simpler, yes, that doesn't make Apache complicated. They're all simple." Didn't you just contradict yourself? How can it be simpler and all be simple? Simpler implies one is greater in simplicity so which is it? FWIW, we were running Apache 1.3 with patches on OpenBSD. For us, using the 2.x branch wasn't possible without staying atop the modules for code issues/vulnerabilities. Considering other client expectations, we didn't have the resources to audit everything like that. The fact that OpenBSD 5.2 included Nginx by default was a nice plus for us too, but we started the move before then.
- leephillips 13y agoWhere's the contradiction? He says that Nginix is simpler than Apache, which is also simple. "which is it?" He just said which one it was. I don't see how anyone could fail to understand this.
- gnaritas 13y ago> Didn't you just contradict yourself? No, I did not. > How can it be simpler and all be simple? Simpler implies one is greater in simplicity so which is it? Is English not your first language? I can choose 5 simple things, and then compare them to each other and say one is simpler. They're all still simple. > FWIW, we were running Apache 1.3 with patches on OpenBSD. For us, using the 2.x branch wasn't possible without staying atop the modules for code issues/vulnerabilities. Sounds like your OS was the real culprit for not keeping up with newer releases. Again, if Nginx works for you, great, you can promote that without putting down Apache which is quite simple and rock solid stable as well.
- mintplant 13y agoI installed Apache recently along with ownCloud on my Raspberry Pi. I had to strip it back out when I realized that Apache worker processes were keeping the CPU and RAM at 100% the entire time, when nothing was even connected to it. I used to use Apache all the time way back when. The memories that stick with me are of a massive tangle of configuration rules, mod_*, and htaccess files. I've never looked back since going the way of Nginx. It's just so lightweight in comparison, both performance- and maintenance-wise.
- perbu 13y agoThat a bug. Probably an architecture dependant one or some package maintainer who messed up. Your experience with Apache httpd on your little homebrew computer gadget doesn't say anything about Apache httpd and how it is usually deployed. Apache httpd is still bloody awesome.
- LekkoscPiwa 13y agoLet me explain you what buggy means. Buggy means heavy, overweight, with thousands of configuration lines just to end up with something slow and crashing.
- mintplant 13y agoAs stated in the same comment, my "little homebrew computer gadget" wasn't the only platform I've run Apache httpd on. It was just yet another environment in which it came out as sub-optimal when compared with Nginx in the same use case.
- sliverstorm 13y agoI don't think it's fair to use the rPi as your case-study. You would be hard-pressed to find a complete modern computer that is more different from the typical machine that runs httpd in a commercial environment.
- mintplant 13y agoAs I said, the Raspberry Pi isn't the only platform I've run Apache httpd on, and that experience isn't the primary motivating factor behind my dislike for the software. It just struck me how starkly the difference in resource consumption between it and Nginx was illustrated in that case in particular, as the rPi handles the latter just fine.