How do I add following string to batch file for add it to a file?
<VirtualHost *:80>
ServerAdmin webmaster@mydomain.dev
DocumentRoot "J:\repo\mydomain"
ServerName mydomain.dev
ErrorLog "logs/mydomain.dev-error.log"
CustomLog "logs/mydomain.dev-access.log" common
<Directory "J:\repo\mydomain">
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>
This is what I'm trying to achieve
@echo off
set /p DomName=Enter Domain Name:
Echo "<VirtualHost *:80>
ServerAdmin webmaster@mydomain.dev
DocumentRoot "J:\repo\mydomain"
ServerName mydomain.dev
ErrorLog "logs/mydomain.dev-error.log"
CustomLog "logs/mydomain.dev-access.log" common
<Directory "J:\repo\mydomain">
Order allow,deny
Allow from all
Require all granted
</Directory>
</VirtualHost>" >> "J:\xampp\apache\conf\extra\httpd-vhosts.conf"
:End
I want to replace "DomName" variable inside the string.
Thank you!!!