nginx -c /etc/nginx/nginx.conf

Category: Web Servers & Proxies

nginx -c /etc/nginx/nginx.conf

Start nginx using a specific configuration file

Tells nginx to read its configuration from the given path instead of the compiled-in default, which is /etc/nginx/nginx.conf on most distros. Handy when testing an alternate config or running a second instance. Combine with -t to test a config without starting the server.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.