Code:
sed '/^<[Vv]irtual[Hh]ost.*>/, ^<\/[Vv]irtual[Hh]ost>/ d' httpd.conf
actually works
Just make sure you add some sensible stuff where it's red
so you don't wipe ALL of it. Inserting null or the likes
doesn't make sense, and empty virtual host definition gains
you nothing. If this is not what you want you could try
and just comment things out.
Code:
sed '/^<[Vv]irtual[Hh]ost.*>/, /^<\/[Vv]irtual[Hh]ost>/ s/^/# /' httpd.conf
Cheers,
Tink