httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Krist van Besien <krist.vanbes...@gmail.com>
Subject Re: [users@httpd] three web on the same machine but I get the wrong page for a request using HTTPS (client side)
Date Thu, 28 Jul 2005 11:53:52 GMT
On 7/28/05, Karim Hamed-abdelouahab <karim.ha@gmail.com> wrote:
> Hello everybody,
> 
> I've a web machine running on Fedora core 3.0. Apache 1.33 with mod_ssl.
> 
> This is an extract of my configuration file:
> 
> <IfDefine SSL>
> Listen 80
> Listen 443
> </IfDefine>
> 
> <VirtualHost xxx.xxx.xxx.37:80>
> ServerAdmin someoneverygood@athome.com
> DocumentRoot /var/www/secret
> ServerName ultra.secret.com
> ErrorLog /usr/apache/logs/secret_cl/error_log.log
> </VirtualHost>
> 
> <VirtualHost xxx.xxx.xxx.37:443>
> 
> #  General setup for the virtual host
> NameVirtualHost xxx.xxx.xxx.37
> DocumentRoot "/var/www/secret/web/"
> ServerName www.secret.com
> ServerAdmin verygood@me.com
> ErrorLog /usr/apache/logs/secret_prod/error_log
> TransferLog /usr/apache/logs/secret_prod/access_log
> 
> #   SSL Engine Switch:
> #   Enable/Disable SSL for this virtual host.
> SSLEngine on
> 
> 
> <VirtualHost xxx.xxx.xxx.38:443>
> 
> 
> #  General setup for the virtual host
> NameVirtualHost xxx.xxx.xxx.38
> DocumentRoot "/var/www/secret_dev/web/"
> ServerName dev.secret.com
> ServerAdmin verygood@home.com
> ErrorLog /usr/apache/logs/secret_dev/error_log
> TransferLog /usr/apache/logs/secret_dev/access_log
> 
> #   SSL Engine Switch:
> #   Enable/Disable SSL for this virtual host.
> SSLEngine on
> 
> All the domaine are registred on a DNS that point to the web server:
> dev.secret.com, www.secret.com and finally ultra.secret.com
> 
> Every thing works fine when I try to reach ultra.secret.com on HTTP
> protocole. But when I try to reach ultra.secret.com on HTTPS I get
> www.secret.com page. How can I configure apache so that I will get
> ultra.secret.com on HTTP even I request ultra.secret.com pages on
> HTTPS.

You server is doing exactly what you told it to do. It is serving
requests to xxx.xxx.xxx.37:443 with pages from www.secret.com.
You must realise that the NameVirtualHost directive (which you should
place outside of the VirtualHost container anyway) has no effect for
SSL connections.

What you could do is use a rewrite rule:

RewriteCond %{HTTP_HOST} ultra.secret.com
RewriteRule  (.*) http://ultra.secret.com/$1 [R,L]

-- 
krist.vanbesien@gmail.com
Solothurn, Switzerland

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message