Date: Wed, 08 Sep 1999 12:13:13 +0100 From: Adam Nealis <adamn@csl.com> To: Shawn Ramsey <shawn@cpl.net> Cc: questions@FreeBSD.ORG Subject: Re: mod_ssl question Message-ID: <37D644C9.BA9115E8@csl.com> References: <19990907125536.B13943@cpl.net>
next in thread | previous in thread | raw e-mail | index | archive | help
Shawn Ramsey wrote: > > I know this isn't exactly FreeBSD related.. but I couldn't find this info on > the mod_ssl web site. How should I define SSL enabled virtual hosts? This is > how I have it : > > <IfDefine SSL> > > ## > ## SSL Virtual Host Context > ## > > <VirtualHost _default_:443> > # General setup for the virtual host > DocumentRoot /usr/local/www/data/cpl-dev > ServerName 209.150.92.97 > ServerAdmin shawn@cpl.net > #ErrorLog /usr/local/log/error_log > #TransferLog /usr/local/log/access_log > > SSLEngine on > SSLCertificateFile /usr/local/etc/apache/ssl.crt/cpl.crt > SSLCertificateKeyFile /usr/local/etc/apache/ssl.key/cpl.key > SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown > CustomLog /usr/local/log/ssl_request_log \ > "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" > </VirtualHost> > > <VirtualHost _default_:443> > DocumentRoot /home/tobey/public_html/lucknowenterprises.com > ServerName 209.150.92.95 > ServerAdmin shawn@cpl.net > #ErrorLog /usr/local/log/error_log > #TransferLog /usr/local/log/access_log > SSLEngine on > SSLCertificateFile /usr/local/etc/apache/ssl.crt/www.lucknowenterprises.com.crt > SSLCertificateKeyFile /usr/local/etc/apache/ssl.key/www.lucknowenterprises.com.key > SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown > </VirtualHost> > > </IfDefine> > > I get a virtual host overlap error when starting, which I assume is because > they are both default. What should I change? _default_ is a sort of placeholder. If there is a https request that doesn't match a particular virtual host, then this is the one that is supplied by the server. The one to change is the one that you don't want to be the default 8). If you want neither to nbe the default, then create a third v-host that contains nothing useful. What is missing from your set up is an IP address that apache is bound to for your host, and a server name. For example: > <VirtualHost _default_:443> > DocumentRoot /home/tobey/public_html/lucknowenterprises.com > ServerName 209.150.92.95 becomes <VirtualHost 209.150.92.95:443> DocumentRoot /home/tobey/public_html/lucknowenterprises.com ServerName www.lucknowenterprises.com . . . </VirtualHost> This way, a request from https://www.lucknowenterprises.com/ will get the lucknowenterprises.com server. Hope this helps a little, Adam. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?37D644C9.BA9115E8>