# This one is pretty simple - we’re just using common Unix commands.
# I find this one helpful when I don’t want to generate a rails site skeleton on the server.
# create web application skeletal structures
cd ~/public_html
# domain 1
mkdir -p mydomain1.com/{backup,cgi-bin,log,private,public}
mkdir -p mydomain1.com/{config,releases,shared,tmp}
mkdir -p mydomain1.com/tmp/pids
# create symlinks for a capistrano site here
ln -s /home/super/public_html/mydomain1.com /home/super/public_html/mydomain1.com/current
ln -s /home/super/public_html/mydomain1.com/log /home/super/public_html/mydomain1.com/shared/log
# domain 2 (optional)
mkdir -p mydomain2.net/{backup,cgi-bin,log,private,public}
mkdir -p mydomain2.net/{config,releases,shared,tmp}
mkdir -p mydomain2.net/tmp/pids
# create symlink for capistrano site here
ln -s /home/super/public_html/mydomain2.net /home/super/public_html/mydomain2.net/current
ln -s /home/super/public_html/mydomain2.net/log /home/super/public_html/mydomain2.net/shared/log
# domain 3 (optional)
mkdir -p mydomain3.ws/{backup,cgi-bin,log,private,public}
mkdir -p mydomain3.ws/{config,releases,shared,tmp}
mkdir -p mydomain3.ws/tmp/pids
# create symlink for capistrano site here
ln -s /home/super/public_html/mydomain3.ws /home/super/public_html/mydomain3.ws/current
ln -s /home/super/public_html/mydomain3.ws/log /home/super/public_html/mydomain3.ws/shared/log
# to see what was created in the above code, use “ls -la” command (optional)
ls -la ~/public_html/
ls -la ~/public_html/mydomain1.com
ls -la ~/public_html/mydomain2.net
ls -la ~/public_html/mydomain3.ws
# enable (turn on) website applications in apache
sudo a2ensite mydomain1.com
sudo a2ensite mydomain2.net
sudo a2ensite mydomain3.ws
# disable (turn off) website applications in apache
#sudo a2dissite mydomain1.com
#sudo a2dissite mydomain2.net
#sudo a2dissite mydomain3.ws
# (re)start apache server
sudo /etc/init.d/apache2 start
# or
sudo /etc/init.d/apache2 reload
# visit your sites in a web browser
http://mydomain1.com
http://mydomain2.net
http://mydomain3.ws
# secure versions (self-signed)
https://mydomain1.com
https://mydomain2.net
https://mydomain3.ws
Done!