- server block
- The top-level configuration unit in Nginx that handles requests for a specific IP address, port, and server_name combination. Equivalent to a VirtualHost in Apache. Multiple server blocks can coexist in a single Nginx instance.
- location block
- A nested directive within a server block that matches request URIs and defines how to handle them. Supports exact matching with =, prefix matching, and regex matching with ~ (case-sensitive) or ~* (case-insensitive).
- proxy_pass
- An Nginx directive that forwards the incoming HTTP request to an upstream server and returns the response to the client. Requires companion directives for setting forwarded headers like X-Forwarded-For.
- upstream block
- A named group of backend servers defined with the upstream directive that enables load balancing across multiple application server instances. Referenced by proxy_pass using the upstream name.
- try_files
- An Nginx directive that attempts to serve a list of files or paths in order and falls back to a final argument (typically a named location or status code) if none are found. Essential for SPA routing and static site serving.
- HSTS (HTTP Strict Transport Security)
- A response header that instructs browsers to only access the domain over HTTPS for a specified max-age duration, preventing SSL stripping attacks. Set using add_header Strict-Transport-Security in the HTTPS server block.