How do you comment out a block of text in the vhosts file?
Do I have to put pound/hash symbols (#) in front of EVERY line?
Yes, you will have to put pound/hash symbols (#
) in front of ALL the lines you want commented out. There are no 'block comments' tag/symbols.
Some text editors have column-mode editing, which means you can select multiple lines and edit text in all of them at the same time. You can use this feature to insert the #
symbol in front of the lines you selected.
This is not a solution but a workaround. You can put the code you want to comment inside an IfDefine block, so it will be ignored unless a dumb variable is defined:
<IfDefine IgnoreBlockComment>
...
</IfDefine>
Source: https://serverfault.com/a/414428