Re: [users@httpd] three web on the same machine but I get the wrong page for a request using HTTPS (client side)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 7/28/05, Karim Hamed-abdelouahab <karim.ha@xxxxxxxxx> 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@xxxxxxxxxx
> 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@xxxxxx
> 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@xxxxxxxx
> 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@xxxxxxxxx
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@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux