Hello all, and thanks for a fine product. It's very much appreciated that their is a community edition that's so professional in both function and appearance.
Regarding the Virtual Hosts not working, I have finally (after several hours) come up with a workaround, albeit an inelegant one. I think that the problem is a two headed monster, but have not had time to completely parse the system logs to prove myself right or wrong.
First of all, my system is Centos 4.4 using Apache 2.0.52.
It seems that if you try to edit your httpd.conf to install VirtualServers and the applicable directives, you are wasting your time.
That said, simply comment out any and all VirtualServer directives in your httpd.conf.
Copy a backup and then edit the file that has the last say:
/etc/opt/scalix-tomcat/connector/jk/instance-myserver.conf
There, to quote Dylan, the times are a changin':
Add the NameVirtualHost directive:
NameVirtualHost *:80
Then add your default web server.
<VirtualHost *:80>
ServerName www.my_first_domain.com
ServerAlias my_first_domain.com *.my_first_domain.com
Include /etc/opt/scalix-tomcat/connector/jk/app-myserve.*.conf <-- no need to change
#Set the Doc root to your default server's directory, whatever that happens to be
DocumentRoot /htdocs/my_first_domain
ServerAdmin unappreciated_admin@my_first_domain.com
ServerSignature email
#Let 'em get the index files
DirectoryIndex index.php index.html index.htm index.shtml
LogLevel warn
HostNameLookups off
</VirtualHost>
And there you have the default set. Note that we changed the VirtualHost directive for the virtual server from verbose to wildcard and then specified the server's names and aliai as directives within. Not all directives are required, YMMV. I'm pretty certain that the ones I commented on are the ones that you do need to have.
Now, let's fix up Tomcat and avoidthe Apache http daemon from ignoring our Tomcat virtual because of mismatch. I commented out the original VirtualServer opener and enabled the corrected one.
#<VirtualHost www.my_first_domain.com:443>
<VirtualHost *:443>
Pretty easy. Then I added a ServerName directive within
ServerName www.my_first_domain.com
That will keep Scalix running right.
Now, add the other virtual servers. Note that VirtualHost directive is identical to the default. The next two directives identify our second site for us:
<VirtualHost *:80>
ServerName www.my_second_domain.com
ServerAlias my_second_domain.com *.my_second_domain.com
DocumentRoot /htdocs/my_second_domain
ServerAdmin too.many.hours@my_second_domain.com
ServerSignature email
DirectoryIndex index.html index.php index.htm index.shtml
LogLevel warn
Options Indexes
</VirtualHost>
and so forth and so on with your third, fourth or footh site, with you setting your paths, options and address correctly and nonesuch.
And bounce the httpd daemon however your flavor of Apache does it.
If you get a successul restart, you're golden. If not, fix your typing errors.
Do an httpd -S and take a peek under the VirtualHost hood.
You'll probably note a warning regarding your Tomcat connector on port 443, but with Virtuals it's literally first come, first serve so it will work fine. I'll parse it out of the logs later and then fix the issue, and likely implement a virtual.conf in my Apache configurations directory, but it is after 11pm on Christmas weekend and warnings or no warnings, Scalix is up and fine kludge or no kludge, all of the sites are working fine, this server can go live a few days late but I can go and say hi to my Wife.
(note: I know the directives are hacked to hell, but this was the first go at a fix, and cleanup can wait till Santa's done.)