Single upstream server
The Apache web server is used in common hosting scenarios to serve static files as well as multiple types of interpreted files. The extensive documentation and how-to guides found online help users to get up and running quickly with their favorite CMS. Unfortunately, the typical Apache configuration, due to resource limits, is not able to handle many simultaneous requests. NGINX, though, is designed to handle this kind of traffic and performs very well with little resource consumption. Since most CMSs come preconfigured for Apache, integrating the use of the .htaccess
files for extended configuration, the easiest way to take advantage of NGINX's strengths is for NGINX to simply proxy connections to an Apache instance:
server { location / { proxy_pass http://localhost:8080; } }
This is the most basic proxy configuration possible. NGINX will terminate all client connections and then proxy all requests to the local host on TCP port 8080. We assume here that...