Apache 2.4 messes up SSL certificates


5. Smt

I have the following virtual host configuration with two SSL certificates for the domains *.example.com and *.dev.example.com:

<VirtualHost *:443>
    ServerName site.example.com

    SSLEngine on
    SSLProxyEngine on
    SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
    SSLCertificateFile    /etc/apache2/ssl/certs/example.crt
    SSLCertificateKeyFile /etc/apache2/ssl/private/example.key

    ProxyPreserveHost on
    ProxyPass / http://192.168.1.101:8073/
    ProxyPassReverse / http://192.168.1.101:8073/
</VirtualHost>

<VirtualHost *:443>
    ServerName site.dev.example.com

    SSLEngine on
    SSLProxyEngine on
    SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
    SSLCertificateFile    /etc/apache2/ssl/certs/dev_example.crt
    SSLCertificateKeyFile /etc/apache2/ssl/private/dev_example.key

    ProxyPreserveHost on
    ProxyPass / http://192.168.1.102:8073/
    ProxyPassReverse / http://192.168.1.102:8073/
</VirtualHost>

<VirtualHost *:443>
    ServerAlias *.dev.example.com

    SSLEngine on
    SSLProxyEngine on
    SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
    SSLCertificateFile    /etc/apache2/ssl/certs/dev_example.crt
    SSLCertificateKeyFile /etc/apache2/ssl/private/dev_example.key

    <Proxy balancer://devcluster>
        BalancerMember http://192.168.1.201:8182 
        BalancerMember http://192.168.1.202:8182 
    </Proxy>    
    ProxyPass / balancer://devcluster/
    ProxyPassReverse / balancer://devcluster/
</VirtualHost>

<VirtualHost *:443>
    ServerAlias *.example.com

    SSLEngine on
    SSLProxyEngine on
    SSLOptions +FakeBasicAuth +ExportCertData +StrictRequire
    SSLCertificateFile    /etc/apache2/ssl/certs/example.crt
    SSLCertificateKeyFile /etc/apache2/ssl/private/example.key

    <Proxy balancer://mycluster>
        BalancerMember http://192.168.1.203:8182 
        BalancerMember http://192.168.1.204:8182 
    </Proxy>    
    ProxyPass / balancer://mycluster/
    ProxyPassReverse / balancer://mycluster/
</VirtualHost>

When visiting the website, I get the following:

  1. site.example.com has a valid certificate for *.example.com from example.crt

  2. site.dev.example.com has a valid certificate for *.dev.example.com from dev_example.crt

  3. anything.dev.example.com has a valid certificate for dev_example.crt as *.dev.example.com

  4. But anything.example.com gets invalid certificate for *.dev.example.com from dev_example.crt spceified in *.dev.example.com virtual host

It looks like the virtual host "ServerAlias ​​*.example.com" is picking up the certificate specified in the virtual host "ServerAlias ​​*.dev.example.com"

Is it Apache fault or is there something wrong with my configuration?

cover character

You need to choose a unique ServerName for each SSL virtual host, even if you want ServerAlias ​​to represent what you need. mod_ssl uses the server name as the key for SNI.

Related


Apache: 2 SSL certificates, same DocumentRoot

Dusty Grist My website is configured apacheand now I'm trying to setup redirects correctly. My website uses wildcard SSL authentication and my ssl certificate covers *.mydomain.com. My certificate provider only covers one level of subdomains. My website URL is

2 twisted SSL certificates

calombo I have the following code: from twisted.web.server import Site from twisted.web.static import Data from twisted.internet import reactor, ssl root = Data("", "text/plain") site = Site(root) reactor.listenSSL(config.ws_port, site,

2 twisted SSL certificates

calombo I have the following code: from twisted.web.server import Site from twisted.web.static import Data from twisted.internet import reactor, ssl root = Data("", "text/plain") site = Site(root) reactor.listenSSL(config.ws_port, site,

2 twisted SSL certificates

calombo I have the following code: from twisted.web.server import Site from twisted.web.static import Data from twisted.internet import reactor, ssl root = Data("", "text/plain") site = Site(root) reactor.listenSSL(config.ws_port, site,

How to handle invalid SSL certificates with Apache HttpClient?

Rauch: I know, there are many different questions and many answers about this...but I don't get it... I have: installed ubuntu-9.10-desktop-amd64 + NetBeans6.7.1 "as is" from shutdown. Represents that I need to connect to a site via HTTPS. For this I use Apach

Ignore SSL certificates in Apache HttpClient 4.3

Jakub M .: How to ignore SSL certificate (trust all) for Apache HttpClient 4.3 ? All the answers I've found on SO treat previous versions and the API has changed. related: How to ignore SSL certificate errors in Apache HttpClient 4.0 How to handle invalid SSL

Ignore SSL certificates in Apache HttpClient 4.3

Jacob M. How to ignore SSL certificate (trust all) for Apache HttpClient 4.3 ? All the answers I've found on SO treat previous versions and the API has changed. related: How to ignore SSL certificate errors in Apache HttpClient 4.0 How to handle invalid SSL ce

How to handle invalid SSL certificates with Apache HttpClient?

Rauch: I know, there are many different questions and many answers about this...but I don't get it... I have: installed ubuntu-9.10-desktop-amd64 + NetBeans6.7.1 "as is" from shutdown. Represents that I need to connect to a site via HTTPS. For this I use Apach

Ignore SSL certificates in Apache HttpClient 4.3

Jakub M .: How to ignore SSL certificate (trust all) for Apache HttpClient 4.3 ? All the answers I've found on SO treat previous versions and the API has changed. related: How to ignore SSL certificate errors in Apache HttpClient 4.0 How to handle invalid SSL

apache SSL configuration using trusted certificates

Yerox I want to know, this is my first time using SSL, is this correct. I created self signed Client-Certificates using self created CA my-own-CA.crt . When I bought the trusted CA server certificate, I got an SSL certificate with the file telesec-server.crt a

How to handle invalid SSL certificates with Apache HttpClient?

Rauch: I know, there are many different questions and many answers about this...but I don't get it... I have: installed ubuntu-9.10-desktop-amd64 + NetBeans6.7.1 "as is" from shutdown. Represents that I need to connect to a site via HTTPS. For this I use Apach

Ignore SSL certificates in Apache HttpClient 4.3

Jakub M .: How to ignore SSL certificate (trust all) for Apache HttpClient 4.3 ? All the answers I've found on SO treat previous versions and the API has changed. related: How to ignore SSL certificate errors in Apache HttpClient 4.0 How to handle invalid SSL

apache SSL configuration using trusted certificates

Yerox I want to know, this is my first time using SSL, is this correct. I created self signed Client-Certificates using self created CA my-own-CA.crt . When I bought the trusted CA server certificate, I got an SSL certificate with the file telesec-server.crt a

numpy vectorization messes up datatypes (2)

Erudi I'm getting the unwanted behavior np.vectorize, i.e. it changes the data type of the parameter that goes into the original function. My original question was about the general case , I'll use this new question to ask a more specific case. (Why the second

Dataclass with 2 entities messes up columns

james04 I have two entities in the meeting room database in an android application. The concept is that each site has many groups. @Entity(tableName = "sites") data class Site( @ColumnInfo(name = "server_id") var serverId: Long, @PrimaryKey @

numpy vectorization messes up datatypes (2)

Erudi I'm getting the unwanted behavior np.vectorize, i.e. it changes the data type of the parameter that goes into the original function. My original question was about the general case , I'll use this new question to ask a more specific case. (Why the second

Dataclass with 2 entities messes up columns

james04 I have two entities in the meeting room database in an android application. The concept is that each site has many groups. @Entity(tableName = "sites") data class Site( @ColumnInfo(name = "server_id") var serverId: Long, @PrimaryKey @

numpy vectorization messes up datatypes (2)

Erudi I'm getting the unwanted behavior np.vectorize, i.e. it changes the data type of the parameter that goes into the original function. My original question was about the general case , I'll use this new question to ask a more specific case. (Why the second

Dataclass with 2 entities messes up columns

james04 I have two entities in the meeting room database in an android application. The concept is that each site has many groups. @Entity(tableName = "sites") data class Site( @ColumnInfo(name = "server_id") var serverId: Long, @PrimaryKey @

numpy vectorization messes up datatypes (2)

Erudi I'm getting the unwanted behavior np.vectorize, i.e. it changes the data type of the parameter that goes into the original function. My original question was about the general case , I'll use this new question to ask a more specific case. (Why the second

Dataclass with 2 entities messes up columns

james04 I have two entities in the meeting room database in an android application. The concept is that each site has many groups. @Entity(tableName = "sites") data class Site( @ColumnInfo(name = "server_id") var serverId: Long, @PrimaryKey @

Dataclass with 2 entities messes up columns

james04 I have two entities in the meeting room database in an android application. The concept is that each site has many groups. @Entity(tableName = "sites") data class Site( @ColumnInfo(name = "server_id") var serverId: Long, @PrimaryKey @

Are there any modern tutorials for setting up SSL on apache2?

John Barber Lucero I have been running apache2 on an ubuntu server without SSL for a long time. Now, I want to serve some directories over SSL, but I can't find any simple tutorials written recently. The best I've found is http://vanemery.com/Linux/Apache/apac

Are there any modern tutorials for setting up SSL on apache2?

John Barber Lucero I have been running apache2 on an ubuntu server without SSL for a long time. Now, I want to serve some directories over SSL, but I can't find any simple tutorials written recently. The best I've found is http://vanemery.com/Linux/Apache/apac

Are there any modern tutorials for setting up SSL on apache2?

John Barber Lucero I have been running apache2 on an ubuntu server without SSL for a long time. Now, I want to serve some directories over SSL, but I can't find any simple tutorials written recently. The best I've found is http://vanemery.com/Linux/Apache/apac

Are there any modern tutorials for setting up SSL on apache2?

John Barber Lucero I have been running apache2 on an ubuntu server without SSL for a long time. Now, I want to serve some directories over SSL, but I can't find any simple tutorials written recently. The best I've found is http://vanemery.com/Linux/Apache/apac