List tutti i vhost di apache

Ecco uno script perl/bash dove tiro fuori formattati bene tutti i vhost di apache : Modo più verboso : /usr/sbin/apache2ctl −S 2>&1 | perl −ne ‘m@.*port\s+([0−9]+)\s+\w+\s+(\S+)\s+\((.+):.*@ && do { print “$2:$1\n\t$3\n”; $root = qx{grep DocumentRoot $3}; $root =~ s/^\s+//; print “\t$root\n” };’ Modo meno verboso : #!/bin/bash apache2ctl −S 2>&1 | grep −v Syntax | perl −ne ‘m@.*port\s+([0−9]+)\s+\w+\s+(\S+)\s+\((.+):.*@ && do { print “$2:$1\n”;};’