A set of scripts to do one-stroke virtual host setup with apache2 package in Debian/Ubuntu.
Author: Timothy Chien [:timdream] <email@example.com>
Make a virtual host. Upon execution,
- create vhost directories and all configration files.
- Set up two virtual hosts config named
shortnameis the name you specified). The later one is good for blind redirection, e.g.
- Set up logrotate, awstat and their corntab.
All configration files are contained in the specified directory and symbolic linked to proper places.
Remove symbolic links of the vhost configration files created by
To permentently delete the entire virtual host, do
rm -R ./your-vhost/.
Recreate symbolic links.
Experimental: Setup LAMP enviroment on a bare Ubuntu system.
- The Debian
apache2package changed default virtual host setting from
<VirtualHost *:80>after version 2.2.9-8. If you are still running apache2 below that version (you really shouldn't), you should modify
mkvhost.shaccordingly BEFORE creating virtual hosts.