On Mon, Dec 17, 2001 at 06:32:06PM +0000, Luciano Miguel Ferreira Rocha wrote: > Another way would be a creation of a simple perl script that upon the > request for apache's start or restart would read a configuration file > that just listed the hostname (and possible responsible person's address), > and from that created all needed configuration for those virtual hosts and > joined that to apache's global configuration. >
Here's a very simple script that does just that: (it reads the host (and optionally the email) from stdin) #! /bin/sh while read VHOST EMAIL do [ -z "$EMAIL" ] && EMAIL="admin@$VHOST" cat <<EOF <VirtualHost 200.200.200.1:443> ServerName $VHOST ServerAlias www.$VHOST DocumentRoot /data/static-content/$VHOST ServerAdmin $EMAIL CustomLog /data/log/apache-access-$VHOST combined SSLEngine on SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL SSLCertificateFile /data/key/$VHOST.crt SSLCertificateKeyFile /data/key/$VHOST.key </VirtualHost> EOF done -- Luciano Rocha, [EMAIL PROTECTED] The trouble with computers is that they do what you tell them, not what you want. -- D. Cohen ______________________________________________________________________ Apache Interface to OpenSSL (mod_ssl) www.modssl.org User Support Mailing List [EMAIL PROTECTED] Automated List Manager [EMAIL PROTECTED]