News for hackers. Stuff that matters.
Re:Nginx Is Taking Over the Internet by jh3 on Friday September 06, 2013 @11:34AM (#6340922)
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.
Re:Nginx Is Taking Over the Internet by gnaritas on Friday September 06, 2013 @11:40AM (#6340956)
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.

Re:Nginx Is Taking Over the Internet by hardwaresofton on Friday September 06, 2013 @11:42AM (#6340969)
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.

Re:Nginx Is Taking Over the Internet by gnaritas on Friday September 06, 2013 @01:26PM (#6341543)
It's just as easy in Apache.
Re:Nginx Is Taking Over the Internet by Helianthus on Friday September 06, 2013 @02:00PM (#6341721)
...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?

Re:Nginx Is Taking Over the Internet by troels on Friday September 06, 2013 @02:19PM (#6341832)
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.

Re:Nginx Is Taking Over the Internet by hardwaresofton on Friday September 06, 2013 @09:21PM (#6343561)
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.

Re:Nginx Is Taking Over the Internet by troels on Saturday September 07, 2013 @05:20AM (#6344513)
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.

Re:Nginx Is Taking Over the Internet by hardwaresofton on Saturday September 07, 2013 @10:52AM (#6345226)
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

Re:Nginx Is Taking Over the Internet by Helianthus on Friday September 06, 2013 @02:26PM (#6341873)
... hahaha exactly.

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

Re:Nginx Is Taking Over the Internet by gnaritas on Friday September 06, 2013 @02:48PM (#6341992)
> 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.

Re:Nginx Is Taking Over the Internet by hardwaresofton on Friday September 06, 2013 @09:24PM (#6343568)
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.

Re:Nginx Is Taking Over the Internet by nawitus on Friday September 06, 2013 @12:12PM (#6341142)
It is definately simpler to configure Nginx to reverse proxy, Apache needs a few more lines of configuration.
Re:Nginx Is Taking Over the Internet by jebblue on Friday September 06, 2013 @12:57PM (#6341378)
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.

Re:Nginx Is Taking Over the Internet by nawitus on Friday September 06, 2013 @01:16PM (#6341487)
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.
Re:Nginx Is Taking Over the Internet by gnaritas on Friday September 06, 2013 @02:58PM (#6342046)
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.
Re:Nginx Is Taking Over the Internet by MatthewPhillips on Friday September 06, 2013 @01:04PM (#6341418)
For the simple case Apache is only 2 lines. Nginx requires more, because Apache automatically sets the proxy headers and Nginx does not.
Re:Nginx Is Taking Over the Internet by insertnickname on Saturday September 07, 2013 @02:51AM (#6344187)