Live data from Hacker News

Why Use Nginx?

wiki.nginx.org

71–80 of 91 posts

Re: Why Use Nginx?

#71

Every single project, open source or not, needs to have a "Why Use It" page. (Now this is more of a "Testimonials" page, but for server tech it will do.) > Apache is like Microsoft Word, it has a million options but you only need six. Nginx does those six things, and it does five of them 50 times faster than Apache. This is exactly how I felt. I'm a pea-brained dolt in the server sphere, and when I was remaking my se…

> Every single project, open source or not, needs to have a "Why Use It" page.

Let me expand your comment (with your permission) to make it more general.

"Every project, open source or not, needs to be run with all the branches of a proper organization"

Let me flesh it out with an example: some time ago there was a flame here and on proggit about cricitisism of C++. Some arguments and counter-arguments (http://www.reddit.com/r/programming/comments/197dn1/introduc...) got me thinking (have mercy, o' HN C++ overlords)

1. Problems are due to power and flexibility Design : build simple and tight systems or get smart enough to build tight complex systems.

2. clang is fixing template error messages Execution: reasonable to demand this be done before standardization

3. This is an implementation problem Management apathy: Passing the buck

4. C++ is not one language but actually many different ones Marketing : Positioning

etc

There should be no reason why open-source projects should be 'good code, bad with everything else'.

Re: Why Use Nginx?

#72
post #9

Every single project, open source or not, needs to have a "Why Use It" page. (Now this is more of a "Testimonials" page, but for server tech it will do.) > Apache is like Microsoft Word, it has a million options but you only need six. Nginx does those six things, and it does five of them 50 times faster than Apache. This is exactly how I felt. I'm a pea-brained dolt in the server sphere, and when I was remaking my se…

> Every single project, open source or not, needs to have a "Why Use It" page. Not only that, but a mention of all the major competitors with an honest factual comparison with them is really handy as well. In the FLOSS world, naming competitors won't necessarily cause a major problem and does a huge amount for trust.

yeah but you can't ask Product X to tell you about Product Y because they honestly don't know Product Y well enough to speak to it.

Re: Why Use Nginx?

#73
post #44

Earlier quoted context omitted.

Unless I'm missing something you only need to have a version Apache that supports SNI then have NameVirtualHost for your https port. If your os/distro doesn't make that version easily available then I can see how it might take extra work to get SNI support.

What I should have said was that I've been too lazy (like to an extreme degree) to host multiple SSL sites using SNI. Just buying another IP was easier for me. It's probably stupid to do that but that's just me.

Actually doing SNI can be the stupid solution. We still have a large number of customers on Windows XP and we probably will for years to come. SNI isn't supported on any IE browser running on XP, so you need to buy the extra IPs anyway.

Re: Why Use Nginx?

#74

I've used Apache exclusively for the last 3 years until just a few months ago when I set up another server to host a number of sites I wanted to move off Apache and on to Nginx. After having used both, and trying real hard here not to start a religious war as is what happens often in these kinds of discussions, I have to say neither is "better" overall or in general in my experience. If you're familiar with Apache co…

> I love being able to host multiple SSL sites on a single IP with no hoops to jump through with Nginx. On Apache your options are to acquire more IPs or set up SNI which for me was more hassle than it was worth. What? Neither Apache nor nginx can serve multiple SSL sites off a single IP without a UCC certificate, SNI, or multiple IPs. SSL requests have their Host header encrypted, which means the server doesn't know…

Nginx can (and according to wikipedia Apache can too), I have been doing so until my old certificate expired. It's called SNI (https://en.wikipedia.org/wiki/Server_Name_Indication) and if your openSSL version has support compiled in, it works without any additional configuration (Beyond just normally specifying the correct certificate and key for the correct server)

Re: Why Use Nginx?

#77
post #28

Can someone give me a small comparison between nginx and HAProxy? It seems like they're starting to overlap a lot. I'm really excited that nginx added Websocket (including SSL termination) support.

I don't think you can compare them

Re: Why Use Nginx?

#78

I've used Apache exclusively for the last 3 years until just a few months ago when I set up another server to host a number of sites I wanted to move off Apache and on to Nginx. After having used both, and trying real hard here not to start a religious war as is what happens often in these kinds of discussions, I have to say neither is "better" overall or in general in my experience. If you're familiar with Apache co…

You don't need fast go to serve php through nginx. You can - and probably should - just use nginx as a reverse proxy in front of php-enabled apache. Best of both world.

> Best of both worlds

How is this best of both worlds?! You add one more layer where things can go wrong, for mostly no benefit nowadays. Now people need to know how to properly configure and secure two pieces of technology that do the same things. I know this is the most popular setup nowadays for new php deployments and this is why I hate it so much! Why does everyone have to complect anything from software to devops nowadays?! If you start with something like this and use the same mindset of "just the best tool for the job, nothing else, not matter how many tools you use" for everything from devops to frameworks to your app you'll end up sooner or later with something that makes asp.net and iis setups or even spring based enterprisey ones look like a breath of fresh air! Better spend some extra effort to make your php app work great on the nginx+php setup. My advice for anybody doing PHP: remember why you are using PHP and not something else in the first place! because you want everything to be drop-dead no-think simple, from devops to framework, to app! because this way you can concentrate 90% of your effort on front-end, design and pr (and it's not necessarily bad if this is how your business should work)!

Re: Why Use Nginx?

#79
post #72
post #9

Earlier quoted context omitted.

> Every single project, open source or not, needs to have a "Why Use It" page. Not only that, but a mention of all the major competitors with an honest factual comparison with them is really handy as well. In the FLOSS world, naming competitors won't necessarily cause a major problem and does a huge amount for trust.

yeah but you can't ask Product X to tell you about Product Y because they honestly don't know Product Y well enough to speak to it.

You have to ask yourself, if your building a product and you know nothing about it's potential competitors, what are you really doing? Research is key my opinion. It avoids cases of "Hey guys, look what I invented! I call it the wheel.."

Re: Why Use Nginx?

#80
post #78

Earlier quoted context omitted.

You don't need fast go to serve php through nginx. You can - and probably should - just use nginx as a reverse proxy in front of php-enabled apache. Best of both world.

> Best of both worlds How is this best of both worlds?! You add one more layer where things can go wrong, for mostly no benefit nowadays. Now people need to know how to properly configure and secure two pieces of technology that do the same things . I know this is the most popular setup nowadays for new php deployments and this is why I hate it so much! Why does everyone have to complect anything from software to dev…

I've been using Apache behind Nginx for years, and not once has it gone wrong. HTTP reverse proxying is not something overly complicated that can go wrong often.

How it is best of both worlds? Nginx simply does not have all the features Apache have. Take a look at the .htaccess rules that Wordpress and WP-Supercache needs. It's much easier to to run Wordpress on Apache and put that behind Nginx than to figure out how to rewrite the rules to Nginx form (or worse, update the rules when they change). There's also a ton of Apache modules that have no Nginx equivalent, or no easy Nginx equivalent.

Why I use PHP? Because some apps don't have good Ruby or Python equivalents. After all these years I still haven't found anything better than Wordpress and phpMyAdmin. If it's my own code, sure, I'll write Ruby, but I'm talking about apps.

Putting Nginx before Apache allows it to protect Apache from slow clients because Nginx buffers requests and responses.

Post reply on HN