RE: [users@httpd] NameVirtualHost + SSL certificate problem

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

 



> -----Original Message-----
> From: Laszlo Nagy [mailto:gandalf@xxxxxxxxxxxxxxxxxx] 
> Sent: Thursday, October 19, 2006 1:44 PM
> To: users@xxxxxxxxxxxxxxxx
> Subject: [users@httpd] NameVirtualHost + SSL certificate problem
> 
> 
>   Hello All,
> 
> I have a little problem with my Apache. Here is the software version:
> 
> #apachectl -v
> Server version: Apache/2.0.59
> Server built:   Oct  4 2006 08:32:33
> #uname -a
> FreeBSD designaproduct.biz 6.1-RELEASE-p6 FreeBSD 
> 6.1-RELEASE-p6 #2: Thu 
> Sep  7 07:13:22 EDT 2006     
> gandalf@xxxxxxxxxxxxxxxxxx:/usr/obj/usr/src/sys/DESIGNAPRODUCT  i386
> 
> 
> Here are some important lines from my httpd.conf:
> 
> Listen 80
> Listen 443
> Listen 444
> 
> This is from ssl.conf (included from httpd.conf):
> 
> SSLCertificateFile /usr/local/certs/designaproduct_biz.crt
> SSLCertificateKeyFile /usr/local/certs/designaproduct_biz.key.pem
> SSLCACertificateFile /usr/local/certs/DigiCertCA.crt
> 
> I need to serve many domains (designasign.biz, designateeshirt.biz, 
> shopzeus.com, mess.hu etc.) I only have one IP address, so I'm using 
> name based virtual hosts. However, I also need to do secure 
> payments on 
> two sites. I did a trick:

It's called port-based virtual hosting - perfectly OK way of getting
more than one HTTPS site on the same IP (at the cost of having to
specify ":444" in the URLs).

> 
> 
> <VirtualHost *:444>
>     ServerName designasign.biz
>     ServerAlias www.designasign.biz
>     DocumentRoot /www/designasign.biz/
>     SSLEngine On

Move all the SSL certificate directives for this site in here, then it
should work.

>     <Location />
>         Order Allow,Deny
>         Allow from All
>         Options Indexes
>         AllowOverride None
>     </Location>
> </VirtualHost>
> 
> <VirtualHost *:443>
>   ServerName shopzeus.com
>   ServerAlias www.shopzeus.com
>     DocumentRoot /www/shopzeus.com/
> 
>   SSLEngine On
>   SSLCertificateFile /www/certs/www.shopzeus.com.crt
>   SSLCertificateKeyFile /www/certs/shopzeus.com.key.pem
>   SSLCertificateChainFile /www/certs/sf_issuing.crt
>   SSLCACertificateFile /www/certs/sf_issuing.crt
> 
>   <Location />
>      Order allow,deny
>      Allow from all
>   </Location>
> </VirtualHost>
> 
> 
> So in theory, HTTPS requests to port 444 use the default certificate 
> (which belongs to designasign.biz) and HTTPS requests to port 443 use 
> the www.shopzeus.com.crt certificate (which belongs to 
> www.shopzeus.com).
> 
> Everything seems fine, except that apache uses the default 
> certificate 
> for both sites. (You can test it, just go to 
> https://www.shopzeus.com .) 
> Is this a limitation in Apache? If not, what is wrong with my 
> configuration? (I cannot find any error messages or warnings 
> in the logs.)

As soon as you start using virtual hosts, give up the idea of a "default
server" and put all directives in a VH container for each server...

Rgds,
Owen Boyle
Disclaimer: Any disclaimer attached to this message may be ignored. 

> 
> Thanks,
> 
>    Laszlo
> 
> 
> ---------------------------------------------------------------------
> 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
>
 
 
This message is for the named person's use only. It may contain confidential, proprietary or legally privileged information. No confidentiality or privilege is waived or lost by any mistransmission. If you receive this message in error, please notify the sender urgently and then immediately delete the message and any copies of it from your system. Please also immediately destroy any hardcopies of the message. You must not, directly or indirectly, use, disclose, distribute, print, or copy any part of this message if you are not the intended recipient. The sender's company reserves the right to monitor all e-mail communications through their networks. Any views expressed in this message are those of the individual sender, except where the message states otherwise and the sender is authorised to state them to be the views of the sender's company.

---------------------------------------------------------------------
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