Basic Python Apache Vhost creation script

Below is a small script that will allow you to create a vhost on Ubuntu created using Python.  I hope to improve this script over time but it’s a small step in the right direction:

 

In order to run this script you will need to have Python installed and your user needs to have Sudo privilages.  Just copy the contents of this script into a new Python file such as createvhost.py then execute it like so sudo python createvhost.py  it will prompt you to enter than name of your vhost like ‘mydomain.com’

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *