Pretty tough one at first, thought I'd share the experience. I just installed scalix 11 onto a pre-existing webserver. It was hosting 3 different domain names.
Code: Select all
## /etc/httpd/conf/httpd.conf ##
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@domain1.com
DocumentRoot /var/www/html/domain1
ServerName domain1.com
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@domain2.com
DocumentRoot /var/www/html/domain2
ServerName domain2.com
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@domain3.com
DocumentRoot /var/www/html/domain3
ServerName domain3.com
</VirtualHost>
Scalix was a vanilla install, there was a strange dependancy issue but nothing that wasn't easily fixed. The SAC worked perfectly, same with SWA. I tried to access domain1.com but I see the generic Red-Hat page instead of the website. I checked the other domains and there was nothing as well.
It was defaulting to /var/www/html/. for all of the domains, breaking all of them.
Now, looking in /etc/httpd/conf.d you will find two scripts that scalix added during the installation.
Code: Select all
## ll /etc/httpd/conf.d/scalix-* ##
-rw-r--r-- 1 root root 1229 Jul 14 05:02 scalix-tomcat-connector.conf
lrwxrwxrwx 1 root root 47 Aug 17 06:37 scalix-web-client.conf -> /opt/scalix/global/httpd/scalix-web-client.conf
It is the first one scalix-tomcat-connector.conf that is causing the breakage. If you look into that file, you'll find a tree of include statements. At the end of the include tree you'll find a script that tells apache how to find the tomcat components using the ProxyPass directive.
Code: Select all
## /etc/opt/scalix-tomcat/connector/ajp/instance-webserver.conf ##
<VirtualHost domain1.com:80>
Include /etc/opt/scalix-tomcat/connector/ajp/app-webserver.*.conf
</VirtualHost>
The VirtualHost tag was overriding my tags in httpd.conf and removing the NameVirtualHosting. If you remove that script the SAC, SWA, Mobile client, etc stop working but the websites return.
How do you get the NameVirtualHost and the Tomcat components to co-exist?
I did it disabling the scalix generated script and modifying my own tags to basically do the same thing.
Here is an example:
Code: Select all
## /etc/httpd/conf/httpd.conf ##
NameVirtualHost *:80
<VirtualHost *:80>
ServerAdmin webmaster@domain1.com
DocumentRoot /var/www/html/domain1
ServerName domain1.com
#Scalix-tomcat integration
Include /etc/opt/scalix-tomcat/connector/ajp/app-webserver.*.conf
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@domain2.com
DocumentRoot /var/www/html/domain2
ServerName domain2.com
</VirtualHost>
<VirtualHost *:80>
ServerAdmin webmaster@domain3.com
DocumentRoot /var/www/html/domain3
ServerName domain3.com
#Scalix-tomcat integration
Include /etc/opt/scalix-tomcat/connector/ajp/app-webserver.*.conf
</VirtualHost>
As a side effect, now I can control what domains can use the SWA! It will probably break when I apply an update, but it's somthing I'll need to keep in mind. One or the other, or getting another server wasn't an option for me.
Hope this works for you, and I hope that the scalix guys consider this in the next release.
-TD