Web / NGINX Interview questions
What is the nginx.conf file?
nginx.conf is NGINX's main configuration file, typically located at /etc/nginx/nginx.conf. It defines global settings in the main context - things like the number of worker processes, the user NGINX runs as, and error log location - and then opens the events and http blocks.
Rather than keeping everything in one file, most installations split configuration across multiple files under /etc/nginx/conf.d/ or /etc/nginx/sites-available/, pulled in through an include directive inside nginx.conf.
This keeps per-site or per-service configuration modular, so you can enable or disable a site by adding or removing a single include or symlink rather than editing a monolithic file.
More Related questions...