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 files and upload to any location on your server.
- Edit the first section of newvhost after your needs.
- Give the installer script execution permission with
chmod +x installer
- Run the installer with
sudo ./installer
- 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 uninstaller
- Run the uninstaller with
sudo ./uninstaller
- Done
Variable | Default value | Description |
---|---|---|
tSERVERUSER | root | User to user for permissions |
tLOCATION | /var/www | Location to host all virtual hosts (recommended is the home folder of the user specified above) |
tLOCATIONSAFE | /var/www | Safe ocation path, must be same as tLOCATION! |
tDBPW | null |
The script have been tested succefully on a clean machines running
- Ubuntu 14.04 LTS with Apache 2.4 and MySQL Server 5.5
- Debian 7.5 with Apache 2.4 and MySQL Server 5.5
Special thanks to my friend Tzunamii for the original script and code.
Like and use any of my pluings and scripts? Me too!
- Updated vhost templet for Apache 2.4+
- Added some more comments to newvhost script
- Added required section to readme
- Smaller changes to readme
- First release