Subject: Apache 1.3.26+mod_ssl 2.8.9 + vhost problem

From: Deim Agoston <[email-masked]>
Date: Sun, 14 Jul 2002 23:30:05 +0200

Hello!

I've got problems using $SUBJECT together. System is:
- Debian Woody, security upgraded Apache and mod_ssl
- related packeges:
ii  apache         1.3.26-0woody1 Versatile, high-performance HTTP server
ii  apache-common  1.3.26-0woody1 Support files for all Apache webservers
ii  libapache-mod- 1.0.3-3        A DAV module for Apache
ii  libapache-mod- 2.8.9-2        Strong cryptography (HTTPS support) for Apac

I can't live without SSL because I provide file upload to virtual hosts
via DAV, and don't want that somebody sniff one of my user's passwd.
Don't complain: they are not able to use SSL keys so I can't authenticate
them in ths way. So I need SSL.

What happens when I have all modules enabled:
[Mon Jul 15 00:21:52 2002] [error] mod_ssl: Init: (www.xy.hu:80) Illegal attempt to re-initialise SSL for server (theoretically shouldn't happen!)

Related directives:

Listen 443 (previously 30443 packets redirected via ipchains/iptables = it
wasn't necessary to start is as root)
Listen 80 (prev.: 30080)

BindAddress *

LoadModule vhost_alias_module /usr/lib/apache/1.3/mod_vhost_alias.so
LoadModule access_module /usr/lib/apache/1.3/mod_access.so
LoadModule auth_module /usr/lib/apache/1.3/mod_auth.so
LoadModule dav_module /usr/lib/apache/1.3/libdav.so
LoadModule ssl_module /usr/lib/apache/1.3/mod_ssl.so

Port 80 (Previously 30080)

ServerName T.X.Y.Z (numeric IPv4 address)

DocumentRoot /var/www/

<Directory />
  Options SymLinksIfOwnerMatch
  AllowOverride None
</Directory>

<Directory /var/www/>
   Options Includes FollowSymLinks MultiViews
   AllowOverride None
   Order allow,deny
   Allow from all
</Directory>

SSLEngine on
SSLCACertificateFile conf/ssl.crt/ca.crt
SSLCertificateKeyFile conf/ssl.key/server.key
SSLCertificateFile conf/ssl.crt/server.crt
SSLLog  /var/log/apache/ssl_log
SSLLogLevel warn

NameVirtualHost T.X.Y.Z:80
Include virt/

In directory virt:
virtserver1.conf
virtserver2.conf etc.

Example virtserver (only the name and IP address removed):

<VirtualHost T.X.Y.Z>
ServerName www.domainname.hu
ServerAdmin [email-masked]
DocumentRoot /var/www/virtuals/domainname/html
</VirtualHost>

<Directory "/var/www/virtuals/domainname/html">
AllowOverride AuthConfig FileInfo Limit
Options FollowSymLinks
</Directory>

Any ideas? I've seen a similar thread in the archives without the answer.
Thanks,
Ago
______________________________________________________________________
Apache Interface to OpenSSL (mod_ssl)                   www.modssl.org
User Support Mailing List                      [email-masked]
Automated List Manager                            [email-masked]

---

From: Deim Agoston <[email-masked]>
Date: Mon, 15 Jul 2002 00:23:26 +0200

On Sun, Jul 14, 2002 at 11:30:05PM +0200, Deim Agoston <[email-masked]> wrote:
OK, it's solved. For the sake of archive, here it is:
- don't write SSLEngine into the main server config - use a virtualhost
for this directive
- create the virtualhost you want use for the purpose to access it
via HTTPS
A simple config file looks like this (with real names):
<VirtualHost 195.56.172.166:443>
ServerName webadmin.lsc.hu
ServerAdmin [email-masked]
DocumentRoot /var/www/webadmin/

#SSL beallitasok
SSLEngine on

Bye,
Ago