Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

He 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.


The 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.


Yes. 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.


It's just as easy in Apache.


...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?


Oh, 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.


I'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

where as reverse proxies in nginx: 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.


That 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

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.


oh 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


... hahaha exactly.

I didn't say it wasn't simple. But simple is just sufficiently managed complexity.


> Don't you see all the people going "Yeah, it was faster to do this with nginx than it was with Apache"?

Configuring Apache is easy as there are tens of thousands of tutorials showing you exactly how to add those two little lines of code to enable proxy and/or a cert. Both Apache and Nginx are easy to configure, Nginx is easier, that doesn't make Apache hard.

> Are you the sort of person that's surprised PHP got so popular?

Nope, I've worked with tons of PHP developers and I know exactly why it's popular. Wide support, easy copy to server deployment, and in large part, dumber programmers who want you to give them the codes because it's a copy and paste community in large part. All languages have a wide variety of users, but I've found the worst of the worst go to PHP like a month to a flame exactly because it's so simple to get started and despite how terrible a language it is.


I think of PHP as a templating language, to be honest. I like it (I still think the LAMP stack is cool), but the kind of code that it forces you to produce is often focused around document generation (as was the majority of the internet for a long time).

Maybe it's just the wrong tool for this time, and it used to be right tool in the past.


It is definately simpler to configure Nginx to reverse proxy, Apache needs a few more lines of configuration.


From http://httpd.apache.org/docs/2.2/mod/mod_proxy.html:

ProxyPass /foo http://foo.example.com/bar ProxyPassReverse /foo http://foo.example.com/bar

I've used it for years, it's not hard.


I 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.


Installing 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.


For the simple case Apache is only 2 lines. Nginx requires more, because Apache automatically sets the proxy headers and Nginx does not.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: