A simple bash script that creates a virtual host in Apache on Mac.
sudo sh ./vhost.sh domain path
(e.g. sudo sh ./vhost.sh myweb.dev /Users/skala/Developer/Projects/myweb/www
)
- Adds a domain mapping to /etc/hosts
- Adds VirtualHost to /private/etc/apache2/extra/httpd-vhosts.conf
- Restarts Apache