Created
October 25, 2013 14:48
-
-
Save omgmog/7155850 to your computer and use it in GitHub Desktop.
Some commands I use on my Linode VPS to make life easier.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
www=/srv/www | |
conf=/etc/apache2/sites-enabled | |
alias ra='/etc/init.d/apache2 restart' | |
alias ownit='chown -R www-data:www-data .' | |
function makeconf { | |
primary=${1} | |
conffile="${conf}/${primary}.conf" | |
site_path="/srv/www/${primary}" | |
mkdir -p ${site_path} | |
echo "<VirtualHost *:80>" >> "${conffile}" | |
echo " Servername ${primary}" >> "${conffile}" | |
echo " ServerAlias www.${primary}" >> "${conffile}" | |
shift | |
for i; do | |
cat >> "${conffile}" <<EOL | |
ServerAlias ${i} | |
ServerAlias www.${i} | |
EOL | |
done | |
echo " DocumentRoot ${site_path}" >> "${conffile}" | |
echo "</VirtualHost>" >> "${conffile}" | |
} | |
function wordpressitup { | |
wget http://wordpress.org/latest.tar.gz | |
tar xfz latest.tar.gz | |
cd wordpress | |
cp -R * .. | |
cd .. | |
rm -r wordpress | |
echo "Wordpress installed" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment