Show all nginx server_name entries with their config file
which domains does nginx serve | find file containing nginx server block | dump full nginx configuration | nginx serving wrong site | nginx | configuration | server-namenginx -T 2>/dev/null | grep -E "^# configuration file|server_name "nginx -T tests the configuration and then prints it in full, each file introduced by a comment line with its file name. The filter keeps only those file lines and the server_name directives. This quickly shows which server block handles a domain and whether it appears twice.
Note: Without the grep, nginx -T > /root/nginx-dump.txt gives a complete backup of the effective configuration to read through.
Also searched as
- which domains does nginx serve
- find file containing nginx server block
- dump full nginx configuration
- nginx serving wrong site