4 ms·
https://www.nginx.com/resources/admin-guide/reverse-proxy/ https://www.nginx.com/resources/admin-guide/reverse-proxy/
by jamroom 10y ago
https://www.nginx.com/resources/admin-guide/reverse-proxy/ https://www.nginx.com/resources/admin-guide/reverse-proxy/
- Sir_Cmpwn 10y agoI know you can reverse proxy, but I haven't heard of anyone reverse proxying to apache.
- nkozyra 10y agoIt's extraordinarily common but largely unnecessary.
- justbaker 10y agoI've done it and yeah don't do it.
- fgonzag 10y agoThat 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!
- ue_ 10y agoReverse 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.
- vidarh 10y agoI 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.
- pwenzel 10y agoWebfaction 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-10000-reqssec-with-nginx-2/ https://blog.webfaction.com/2008/12/a-little-holiday-present...
- lucideer 10y agoI'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.
- vidarh 10y agoThere'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.