3 ms·
Why do you use a web server (Nginx) in front of other web servers? I'm pretty new to this. Thanks.
by genwin 14y ago
Why do you use a web server (Nginx) in front of other web servers? I'm pretty new to this. Thanks.
- ceejayoz 14y agoI've seen situations where nginx sits in front of Apache and serves static files directly, but proxies requests for PHP through to Apache for easier setup.
- ObnoxiousJul 14y agoAs described, static or lighttpd for static and reverse proxy for the domain achieves more than one goal: * you can serve page faster; * you can mix on a same domain more than one app from different servers in the DMZ (for sharing domain based mechanism (flash, Cross site ajax) by rewriting the url; * you can have one front (nginx) and several servers, which with heartbeat mechanism can handle failover. * you could (when ssl certificate were only IP based) share one SSL certificate for more than one back (VIP) It is a pretty low cost quite scalable architecture. I guess you could do it with apache, but I dropped apache since its licence is as understandable as its configurations.