Nginx
NGINX is open source software for web serving, reverse proxying, caching, load balancing, media streaming, and more.
Serves as an ultra fast middle man between a client and server
See AWS EC2 for installation
Configuration File
nginx and its modules configuration defined by nginx.conf
and placed in the directory /usr/local/nginx/conf
,/etc/nginx
, or /usr/local/etc/nginx
.
Directives are divided into simple directives and block directives.
If a block directive can have other directives inside braces, it is called a context (examples: events, http, server, and location).
May include several server blocks for different ports/server names
Nginx decides which server processes a request by testing uri specified in request's header, selects one with longest prefix and passes rest of uri to route
Serving Static Files
Reverse Proxy Server
Advanced
Regex URI
Preceded by ~
Precedent over normal prefix matches
Last updated