Simple script to help you create new Apache virtual hosts quickly and pain free. With the optional step to also create a mysql database and user for your new virtual host.
- Apache 2.4+
- MySQL 5+
- User with sudo access
- Download the [latest release] (https://github.com/SilverBull/Newvhost/releases/latest)
(optionaly you can use
wget --no-check-certificate --content-disposition https://github.com/SilverBull/Newvhost/releases/latest/download/package.zip
. - Extract the files where you want and navigate inside the folder
- Edit the first section of newvhost after your needs.
- Give the installer script execution permission with
chmod +x vhinstaller
- Run the installer with
sudo ./vhinstaller
- Use the now available
sudo newvhost
command to create your first virtual host.
When finished the installation you can safely delete the files you downloaded.
- Give the uninstaller script execution permission with
chmod +x vhuninstaller
- Run the uninstaller with
sudo ./vhuninstaller
- Done
Variable | Default value | Description |
---|---|---|
tSERVERUSER | root | User to user for permissions |
tLOCATION | /var/www/html | Location to host all virtual hosts (recommended is the home folder of the user specified above) |
tLOCATIONSAFE | /var/www/html | Safe ocation path, must be same as tLOCATION! |
tDBPW | null |
Special thanks to the original creator