You can do that using the Virtualmin/Webmin GUI by going into Server Configuration -> Configure Website for the Virtual Server you wish to edit, and then click “Edit Directives”.
From there, you can add the code you mentioned above.
Note that each Virtual Server already has a “CustomLog” line, so you wouldn’t need to add a second one or you may start seeing some unexpected results