xampphost
Automatic creation of new hosts for XAMPP/Mac
Script creates new directory and subdirectory 'www' in a directory, where you store your web projects. Then, adds this directory to XAMPP vhosts file and creates hostname, adds hostname to /etc/hosts
and restarts XAMPP's Apache.
Usage
- Download xampphost.sh
- Make it executable (
chmod +x xampphost.sh
) - Edit file, configure path to your project folder and XAMPP location
- Run:
sudo ./xampphost.sh newhost
Script will create directory newhost/www
in your webproject folder and adds 2 hosts newhost and newhost.dev. Also it creates basic index.html file to show it works.