1 |
>> I'm confused because I have in apache2 config: |
2 |
>> |
3 |
>> <VirtualHost 1.2.3.1:443> |
4 |
>> ... |
5 |
>> SSLCertificateFile /etc/apache2/ssl/www.example1.com.crt |
6 |
>> SSLCertificateKeyFile /etc/apache2/ssl/www.example1.com.key |
7 |
>> ... |
8 |
>> </VirtualHost> |
9 |
>> <VirtualHost 1.2.3.2:443> |
10 |
>> ... |
11 |
>> SSLCertificateFile /etc/apache2/ssl/www.example2.com.crt |
12 |
>> SSLCertificateKeyFile /etc/apache2/ssl/www.example2.com.key |
13 |
>> ... |
14 |
>> </VirtualHost> |
15 |
>> |
16 |
>> But if I request https://1.2.3.2 or https://1.2.3.2:443, I'm presented |
17 |
>> with an SSL cert that has www.example1.com for the Common Name. I |
18 |
>> used openssl to verify that the Common Name for www.example2.com.crt |
19 |
>> is www.example2.com. |
20 |
> |
21 |
> Make sure you don't have SSLCertificateFile/SSLCertificateKeyFile |
22 |
> defined anywhere outside of the virtual hosts. |
23 |
|
24 |
It was ServerName. I had ServerName defined as www.example1.com in |
25 |
/etc/apache2/vhosts.d/default_vhost.include. I removed it from there |
26 |
and added it to each of my SSL VirtualHost blocks and now everything |
27 |
works. I noticed that removing ServerName entirely works for Firefox, |
28 |
but in that case SSL wouldn't work for either domain in Opera. |
29 |
|
30 |
I thought ServerName was just a label like ServerAdmin. Should I be |
31 |
OK only having it defined in each of my SSL VirtualHost blocks? |
32 |
|
33 |
Thanks a lot for everyone's help with this. You helped me realize it |
34 |
was an apache2 config problem. |
35 |
|
36 |
- Grant |