/ Published in: Bash
URL: init-site
A small script that sets up a new VirtualHost with Apache and adds an entry for the site to your hosts file. You need to adjust the paths to your needs. Must be run as root.
Expand |
Embed | Plain Text
#!/bin/bash if [ $# -ne 1 ] then echo "Usage - $0 project name" echo "" exit 1 fi echo " 127.0.0.1 $1" >> /etc/hosts echo " <VirtualHost *:80> ServerAdmin me@localhost DocumentRoot /home/stefan/wwwroot/cake/$1/webroot/ ServerName $1 </VirtualHost> " >> /etc/apache2/sites-enabled/all apache2ctl restart
You need to login to post a comment.
