httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Maroun, Fred" <fred.mar...@eds.com>
Subject [users@httpd] Occasional crisscrossing of virtual hosts with Apache
Date Fri, 24 Apr 2009 16:47:11 GMT
We have several virtual hosts with a configuration that looks like this:

NameVirtualHost *:80

<VirtualHost _default_:80>
    ServerName          server1234
    DocumentRoot        /opt/coolstack/apache2/htdocs
</VirtualHost>

<VirtualHost *:80>
    ServerName          offering1.mybank.org
    DocumentRoot        /opt/coolstack/apache2/htdocs/offering1
</VirtualHost>

<VirtualHost *:80>
    ServerName          offering1.mabanque.org
    DocumentRoot        /opt/coolstack/apache2/htdocs/offering1
</VirtualHost>

<VirtualHost *:80>
    ServerName          offering1.bank-banque-mine.org
    DocumentRoot        /opt/coolstack/apache2/htdocs/offering1
    UseCanonicalName Off
</VirtualHost>

<VirtualHost *:80>
    ServerName          offering2.mybank.org
    DocumentRoot        /opt/coolstack/apache2/htdocs/offering2
</VirtualHost>

<VirtualHost *:80>
    ServerName          offering2.mabanque.org
    DocumentRoot        /opt/coolstack/apache2/htdocs/offering2
</VirtualHost>

<VirtualHost *:80>
    ServerName          offering2.bank-banque-mine.org
    DocumentRoot        /opt/coolstack/apache2/htdocs/offering2
</VirtualHost>

<VirtualHost *:80>
    ServerName          www2.app1.myg.org
    DocumentRoot        /opt/coolstack/apache2/htdocs/app1
</VirtualHost>

<VirtualHost *:80>
    ServerName          www2.fapp1.myg.org
    DocumentRoot        /opt/coolstack/apache2/htdocs/app1
</VirtualHost>

<VirtualHost *:80>
    ServerName          www.orgnadasavingsbonds.org
    DocumentRoot        /opt/coolstack/apache2/htdocs/app1
</VirtualHost>

<VirtualHost *:80>
    ServerName          product1.org
    DocumentRoot        /opt/coolstack/apache2/htdocs/app1
</VirtualHost>

<VirtualHost *:80>
    ServerName          www.produit1.org
    DocumentRoot        /opt/coolstack/apache2/htdocs/app1
</VirtualHost>

<VirtualHost *:80>
    ServerName          obligationsdepargneducanada.org
    DocumentRoot        /opt/coolstack/apache2/htdocs/app1
</VirtualHost>

<VirtualHost *:80>
    ServerName          www.app1.myg.org
    DocumentRoot        /opt/coolstack/apache2/htdocs/app1
</VirtualHost>

<VirtualHost *:80>
    ServerName          app1.myg.org
    DocumentRoot        /opt/coolstack/apache2/htdocs/app1
</VirtualHost>

<VirtualHost *:80>
    ServerName          www.fapp1.myg.org
    DocumentRoot        /opt/coolstack/apache2/htdocs/app1
</VirtualHost>

<VirtualHost *:80>
    ServerName          fapp1.myg.org
    DocumentRoot        /opt/coolstack/apache2/htdocs/app1
</VirtualHost>

It works fine 99% of the time.  The problem is that occasionally the
user enters one host name (e.g., app1.myg.org) and he is sent to the
wrong folder (e.g., /opt/coolstack/apache2/htdocs/offering2).

We are using Apache version 2.2.9.  The system is live so we need to fix
this quickly.  Any suggestions?



Mime
View raw message