 <p><strong>Update:</strong> Thanks to @Putnik for pointing out an easier way (but I prefer only listing sites-enabled):</p> <pre><code>grep server_name /etc/nginx/sites-enabled/* -RiI </code></pre> <hr> <p><strong>Old Post:</strong></p> <p>Try something like this:</p> <pre><code>find /etc/nginx/sites-enabled/ -type f -print0 | xargs -0 egrep '^(\s|\t)*server_name' </code></pre> <p>Hope that helps!</p>