Hacker News new | past | comments | ask | show | jobs | submit login

People do that? And it's widespread? I've never heard of this.




I know you can reverse proxy, but I haven't heard of anyone reverse proxying to apache.


There's a massive amount of Apache modules and installs of stuff that has various dependencies on Apache where it's simply not worthwhile to expend any effort to convert it to Nginx, but where it's worthwhile placing in Nginx in front if you prefer Nginx for things like caching, load balancing etc.


That was the original way (at least the most common way) to do CGI. Nginx as a reverse proxy / load balancer / SSL terminator / static file server pointing to a backend running apache for mod_cgi or mod_fastcgi. And a lot of people would have both web servers running on the same server. You already have a web server, why do you need two?! Just pick one!


I feel old now. It was nowhere near the original way - CGI predates Nginx by a decade.

> why do you need two?! Just pick one!

When they're good at different things.


Reverse proxying to Apache is still how I run my Perl CGI scripts. I'm not sure of a better way to do it that supports running multiple scripts.


Webfaction has been doing it that way since roughly 2008, initially introduced as a way to speed up serving of static files.

https://blog.webfaction.com/2008/12/a-little-holiday-present...


It's extraordinarily common but largely unnecessary.


I'd say the most common use-case (particularly given the ubiquity of PHP on the web) is to support mod_php for people not wanting to move to php-fpm for whatever reason - often some weird legacy reason, or sometimes just familiarity and change overhead.


I've done it and yeah don't do it.


This must be the single most common use of nginx, I'm totally blown away that someone as prolific as you has never heard of it.


No, the most common use of nginx is to put it in front of rails/play/jee/whatever framework that doesn't ship with a full featured web server.




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

Search: