Forum Moderators: phranque
My procedure is to ssh into the machine
cp template.conf.txt lastname.firstname.conf
sudo nano -w lastname.firstname.conf
I then edit the file, save it, and apachectl graeceful. There is a lot of room for error in a path, what would be nice, is variables:
DOMAIN='example.com'
LOC='/opt/local/www/clients'
NAME='last.first'
# START example.com
<VirtualHost *:80>
DocumentRoot "$LOC/$NAME/$DOMAIN"
ServerAdmin user@example.com
ServerName $DOMAIN
ServerAlias www.$DOMAIN
DirectoryIndex index.html
# php setttings
php_admin_value open_basedir "$LOC/$NAME/$DOMAIN/:/private/var/tmp/:"
php_value engine off
<Directory "$LOC/$NAME/$DOMAIN">
Options FollowSymLinks
AllowOverride All
Order allow,deny
allow from all
</Directory>
</VirtualHost>
# END example.com
If this is not possible, I think I will just shell script it as
./create-vhost arg-domain arg-loc arg-name int-php
Thought I would ask the masters what they thought.