I am using lubuntu 20.04 with Apache 2
I was wanting to automate the creation of a new virtual host in Apache.
Can I write a script file that will do all of the MANY steps to add a new domain to Apachie 2? I would just edit the script file and put in the new virtual host name like “XYZTest.com”. The script would add the directory and assign the appropriate rights. I would add a generic Index.htm file to the new directory.
Then when Apache on my Lubuntu machine sees a port 80 request for joeltest.com it would respond with the Index.htm file in directory. I think apache like to see a directory like /var/www/html/joeltest.com
HOWEVER this may not be possible since I think there are MANY steps plus I have to add lines to multiple files to add a new virtual host. :-((