Last active
December 26, 2015 18:19
-
-
Save noomz/7193904 to your computer and use it in GitHub Desktop.
Setup web server on ubuntu 12.04 LTS
This file contains hidden or 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
# 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