Skip to content

Instantly share code, notes, and snippets.

@noomz
Last active December 26, 2015 18:19
Show Gist options
  • Save noomz/7193904 to your computer and use it in GitHub Desktop.
Save noomz/7193904 to your computer and use it in GitHub Desktop.
Setup web server on ubuntu 12.04 LTS
# Install apache2 via tasksel
sudo tasksel install lamp-server
# Add user
adduser noomz
# Add user to admin (sudo-able) group
usermod -a -G adm,sudo,www-data noomz
# Logout from root and login as user we have just created
# Create own dir
mkdir noomz.in.th
cd noomz.in.th
mkdir -p dev/html dev/logs
sudo chgrp www-data noomz.in.th/*
sudo chmod g+w noomz.in.th/*
# Make a sym link
ln -s /home/noomz/noomz.in.th/ /var/www/noomz.in.th/
# Create a apache2 virtual host file
# @see : https://gist.github.com/noomz/7194254
# restart apache2 server
sudo service apache2 restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment