Web / NGINX Interview questions
List common NGINX configuration directives?
Some directives appear in almost every NGINX configuration:
listen- the port and optional address a server block binds to.server_name- the hostname(s) that route to this server block.root- the filesystem path used to serve static files.index- the default file served for directory requests, e.g.index.html.proxy_pass- forwards a request to an upstream server or group.location- matches a URI pattern and groups directives for it.worker_processes- how many worker processes to spawn, often set toauto.error_page- maps HTTP error codes to custom response pages.
Most real-world configs combine these across http, server, and location blocks rather than in a single flat file.
More Related questions...