Here I am providing a script to automatically install and configure your server for a domain for Debian style system (Ubuntu, Debian, etc..). The only argument provided to script is the name of website. It will automatically do the following:
Create document root.
Create logs directories.
Create access and error logs.
Copy sample config to apache.
Edit the sample config to meet the new website.
Enable the site.
Restart the web service.
After the script has been invoked, you can access the site.