Skip to content

Instantly share code, notes, and snippets.

@m-maranan
Created December 19, 2013 23:59
Show Gist options
  • Select an option

  • Save m-maranan/8048370 to your computer and use it in GitHub Desktop.

Select an option

Save m-maranan/8048370 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
echo -e "Configure DocumentRoot to /var/www/public"
# Setup hosts file
VHOST=$(cat <<EOF
<VirtualHost *:80>
DocumentRoot "/var/www/public"
ServerName lawfirmrater.dev
<Directory "/var/www/public">
AllowOverride All
</Directory>
</VirtualHost>
EOF
)
echo "${VHOST}" > /etc/apache2/sites-enabled/000-default
# Restart Apache
sudo service apache2 restart
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment