/ Published in: Bash

Fairly self-explanator, but:
Expects a directory at <code>/var/www/skeleton</code> with the correct permissions. This is then copied and renamed. Also expects a file named <code>/etc/apache2/sites-available/skeleton</code> which is used to copy the VirtualHost configuration.
Expects a directory at <code>/var/www/skeleton</code> with the correct permissions. This is then copied and renamed. Also expects a file named <code>/etc/apache2/sites-available/skeleton</code> which is used to copy the VirtualHost configuration.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/bin/sh if [ -z "$1" ]; then echo "Usage: a2mksite <DOMAIN>" echo "" echo "Please supply a domain name" exit 0 fi cp -R "/var/www/skeleton" "/var/www/$1" sed -e "s/skeleton/$1/g" "/etc/apache2/sites-available/skeleton" > "/etc/apache2/sites-available/$1.dev" a2ensite "$1.dev"
Comments
