Skip to content

Instantly share code, notes, and snippets.

View sebbdk's full-sized avatar
Developing ad libitum

Sebastian Vargr sebbdk

Developing ad libitum
View GitHub Profile
#!/bin/bash
# This script creates a new project (or site) under /var/sites and creates
# new virtual host for that site. With the options a site can also
# install the latest version of Laravel directly.
# This script was originally based on the following script by @Nek from
# Coderwall: https://coderwall.com/p/cqoplg
# Display the usage information of the command.
create-project-usage() {
# Debian LAMP Stack (Zsh script)
# Author: Christopher Riding
sudo apt-get update -y && sudo apt-get upgrade -y && sudo apt-get install -y wajig && wajig install -y vim && wajig install apache2 mysql-server && mysql_secure_installation && wajig install php5 php-pear php5-curl php5-mysql
echo "ServerName localhost" >> /etc/apache2/conf.d/name
sudo a2enmod rewrite
sudo service apache2 restart
# Add vhosts
#!/bin/bash
# Script for creating Virtual Servers On Apache
# Check for the correct parameters
if [ $# -eq 0 ]; then
echo 'domain param missing'
echo 'example: create-site your-domain.com'
exit 0
fi