Name Based Vhosts / Virtual Hosts not processing after Insta

Discuss installation of Scalix software

Moderators: ScalixSupport, admin

abbzer0

Name Based Vhosts / Virtual Hosts not processing after Insta

Postby abbzer0 » Thu May 17, 2007 11:12 pm

Hello - I installed and configured Scalix on CentOS 5 (based on RHEL5) and am very pleased with it. My SMTP_AUTH for relaying mail through my ISP is working great, and fetchmail is grabbing a few users pop3 mail and delivering it to their local mailboxes via a crontab cmd. However, my problem is this. After installation my two defined name-based virtual hosts are not processing in apache. I have searched through all the previous threads here, and the best piece of information I could find is from this thread: viewtopic.php?t=3862&highlight=virtual+hosts . I have searched for apache vhost configuration w/ the Tomcat connector on google, but I'm not coming up with much. Currently another name-based vhost is not setup, so I'm just trying to get the www.fqdn.com working right now. The http requests are going to /var/www/html/ as opposed to /var/www/html/www.fqdn.com/ where the site resides. Here is the httpd -S

VirtualHost configuration:
192.168.0.9:80 centos.clintyoung.com (/etc/opt/scalix-tomcat/connector/ajp/instance-centos.conf:1)
192.168.0.9:443 centos.clintyoung.com (/etc/opt/scalix-tomcat/connector/ajp/instance-centos.conf:4)
wildcard NameVirtualHosts and _default_ servers:
_default_:443 centos.clintyoung.com (/etc/httpd/conf.d/ssl.conf:81)
*:80 is a NameVirtualHost
default server www.clintyoung.com (/etc/opt/scalix-tomcat/connector/ajp/instance-centos.conf:15)
port 80 namevhost www.clintyoung.com (/etc/opt/scalix-tomcat/connector/ajp/instance-centos.conf:15)
Syntax OK



If somebody could please help me I would greatly appreciate it. The name-based Vhosts were previously defined in my httpd.conf file at the end, and all worked perfectly, that is, until I installed scalix and the tomcat connector (am I correct in thinking that this is the culprit of my immediate troubles?). Thanks for your anticipated assistance.

On a side note, I think the Scalix product is great! I couldn't be happier (well, unless my vhosts start working again.. :roll: )

abbzer0

Postby abbzer0 » Tue May 22, 2007 9:54 pm

Thoughts? Anybody? :roll: :roll:

m2pilot
Posts: 18
Joined: Sun Jan 28, 2007 2:30 pm

Postby m2pilot » Wed May 30, 2007 3:57 pm

I have this same issue. It seems that the tomcat connector is doing *something* which prevents apache name based virtual host commands from processing. Even more bizarre is that apache apparently thinks everything is hunky dorey - httpd -S correctly shows the name based virtual hosts as existing. As near as I can debug, by the time the name based lines see an incoming request, the hostname has been stripped away - thus the default server always answers the request.

Florian, can you chime in here please?

Mark

abbzer0

Postby abbzer0 » Sat Jun 02, 2007 1:37 am

Well, at least I know I'm not alone here. I have the same thing where Apache things it is all good. Open to any ideas here. Thanks! :D

tcarradine
Posts: 19
Joined: Wed Apr 18, 2007 12:50 am

Postby tcarradine » Sat Jun 02, 2007 7:06 pm

Hey guys, I was having the same problem this morning but I've found a work around.

1) Make sure you've got NameVirtualHost *:80 in httpd.conf

2) make a backup copy of /etc/opt/scalix-tomcat/connector/ajp/instance-yourinstance.conf

3) edit the instance-yourinstance.conf:

On the first line you'll see a VirtualHost configuration- you'll need to change this from:

Code: Select all

<VirtualHost your.hostname.com>

to:

Code: Select all

<VirtualHost *:80>


Then add the rest of the virtual host data for the Scalix server, (this will be the server you use to access /webmail and /sac). Here's an example:

change from:

Code: Select all

<VirtualHost mail.myhost.com>
    Include /etc/opt/scalix-tomcat/connector/ajp/app-ml.*.conf
</VirtualHost>


to:

Code: Select all

<VirtualHost *:80>
  ServerName myhost.com
  DocumentRoot /var/www/vhosts/myhost.com/html
  DirectoryIndex index.html index.htm index.php index.shtml
  ServerAlias *.myhost.com 
  Include /etc/opt/scalix-tomcat/connector/ajp/app-ml.*.conf
</VirtualHost>


You can then add the rest of your virtual hosts using the same format below. If you need to have access to Scalix web clients just add the Include to your other virtual hosts. Test with httpd -S from the command line to make sure you've got your syntax right and you should be good to go.

Note: This is a hack- and I'm no expert. I haven't found this disrupts my Scalix service in any way- but perhaps we could have a dev confirm that this isn't going to break anything?

Hope this helps,

Tim


Return to “Installation”



Who is online

Users browsing this forum: No registered users and 9 guests

cron