virtualhost 一覧
apache
$ /usr/local/apache2/bin/httpd -t -D DUMP_VHOSTS
Ubuntu
$ sudo apache2ctl -t -D DUMP_VHOSTS
UbuntuのApache操作でよく使う「apache2ctl」のオプション一覧 | PANDAMEMO|パンダメモ 2017
nginx
starting from version 1.9.2 you can do:
nginx -Tshow complete nginx configuration
nginx -T | grep "server_name " #include the whitespace to exclude non relevant resultsshow you all server names
nginx -T | grep -E "(listen|server_name) "