Date: Tue, 12 Sep 2000 23:43:18 +0000 From: George Lewis <schvin@schvin.net> To: Steve Price <sprice@hiwaay.net> Cc: freebsd-isp@FreeBSD.ORG Subject: Re: named virtual hosts Message-ID: <20000912234318.K11511@schvin.net> In-Reply-To: <20000912184042.D55208@bsd.planetwe.com>; from sprice@hiwaay.net on Tue, Sep 12, 2000 at 06:40:42PM -0500 References: <20000912184042.D55208@bsd.planetwe.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--fd5uyaI9j6xoeUBo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable You might think about creating some sort of file that has the specifics for each domain, and then write a nifty perl script that whips through it a= nd generates your httpd.conf, inserting defaults or specifics as the case may be. I guess that wouldn't necessarily make it more readable, but might help make it more maintainable and consistent. George Steve Price (sprice@hiwaay.net) wrote: > I have the following setup for Apache and was trying to reduce some > of the duplicate lines. What I have looks something like this. > Because this box will be hosting ~400 domains shortly I can't just > make the variables global. Well I can make some of them global by > using VirtualDocumentRoot and VirtualScriptAlias, but that doesn't > work for all the duplicated lines. >=20 > NameVirtualHost 192.168.21.21 > <VirtualHost 192.168.21.21> > DocumentRoot /home/foo/www > ServerName www.foo.com > ServerAdmin webmaster@foo.com > ErrorLog /home/foo/logs/error.log > TransferLog /home/foo/logs/access.log > ScriptAlias /cgi-bin/ /home/foo/cgi-bin/ > </VirtualHost> > <IfDefine SSL> > <VirtualHost 192.168.21.21:443> > DocumentRoot /home/foo/www > ServerName www.foo.com > ServerAdmin webmaster@foo.com > ErrorLog /home/foo/logs/error.log > TransferLog /home/foo/logs/access.log > ScriptAlias /cgi-bin/ /home/foo/cgi-bin/ > SSLEngine on > SSLCertificateFile /home/foo/ssl/ssl.crt > SSLCertificateKeyFile /home/foo/ssl/ssl.key > </VirtualHost> > </IfDefine> >=20 > What I'd like to be able to do is something like this instead. >=20 > NameVirtualHost 192.168.21.21 > <VirtualHost 192.168.21.21> > DocumentRoot /home/foo/www > ServerName www.foo.com > ServerAdmin webmaster@foo.com > ErrorLog /home/foo/logs/error.log > TransferLog /home/foo/logs/access.log > ScriptAlias /cgi-bin/ /home/foo/cgi-bin/ > <IfDefine SSL> > # The following will not work. > #<If Port =3D=3D 443> > # SSLEngine on > # SSLCertficateFile /home/foo/ssl/ssl.crt > # SSLCertficateKeyFile /home/foo/ssl/ssl.key > #</If> > </IfDefine> > </VirtualHost> >=20 > Any suggestions? Thanks. >=20 > -steve >=20 >=20 > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-isp" in the body of the message --=20 George Lewis http://schvin.net/ --fd5uyaI9j6xoeUBo Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.2 (OpenBSD) Comment: For info see http://www.gnupg.org iD8DBQE5vr+VpwNd2qfAniwRAhMWAJ9NHgnjENgZv549k+8TAD8KMKlvxQCghbp9 lbedmTqesZIE4h1u7XE14vA= =RMj7 -----END PGP SIGNATURE----- --fd5uyaI9j6xoeUBo-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000912234318.K11511>