Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have multiple websites on my Windows Server 2003 vps, running apache2 via xampp. I am using openssl.

When I only had SSL enabled on the 1 site (I have 2 active), everything worked fine - but now I am having problems.

I cannot access https://liamwli.co.uk (or the non-secure variant), as google chrome gives an error when I try to access it:

SSL connection error Unable to make a secure connection to the server. This may be a problem with the server, or it may be requiring a client authentication certificate that you don't have. Error 107 (net::ERR_SSL_PROTOCOL_ERROR): SSL protocol error.

I can access my other site (techmastersforum.co.uk), but it provides a very stripped down site. When I try to access techmastersforum.co.uk through https, it gives me a certificate error, as it is trying to use the certificate for my other domain.

The contents of my httpd-vhosts.conf file is:

NameVirtualHost *:80
    <VirtualHost *:80>
        ServerAdmin liam@liamwli.co.uk
        DocumentRoot "C:/xampp/xampp/htdocs"
        ServerName techmastersforum.co.uk
        ServerAlias www.techmastersforum.co.uk
        ErrorLog "logs/dummy-host.localhost-error.log"
        CustomLog "logs/dummy-host.localhost-access.log" combined
    </VirtualHost>
    <VirtualHost *:443>
        ServerAdmin liam@liamwli.co.uk
        DocumentRoot "C:\xampp\xampp\blog"
        ServerName liamwli.co.uk
        ServerAlias www.liamwli.co.uk
        ErrorLog "logs/liamwlissl.log"
        CustomLog "logs/liamwlissl.log" combined
        SSLEngine On
        SSLCertificateFile "C:\xampp\xampp\certs\www_liamwli_co_uk.crt"
        SSLCertificateKeyFile "C:\xampp\xampp\certs\www_liamwli_co_uk.key"
        SSLCACertificateFile "C:\xampp\xampp\certs\GeoTrust_CA_Bundle.crt"
    </VirtualHost>

    <VirtualHost *:443>
        ServerAdmin liam@liamwli.co.uk
        DocumentRoot "C:\xampp\xampp\htdocs"
        ServerName techmastersforum.co.uk
        ServerAlias www.techmastersforum.co.uk
        ErrorLog "logs/tmfssl.log"
        CustomLog "logs/tmfssl.log" combined
        SSLEngine On
        SSLCertificateFile "C:\xampp\xampp\certs\www_techmastersforum_co_uk.crt"
        SSLCertificateKeyFile "C:\xampp\xampp\certs\www_techmastersforum_co_uk.key"
        SSLCACertificateFile "C:\xampp\xampp\certs\GeoTrust_CA_Bundle.crt"
    </VirtualHost>

    <VirtualHost *:80>
        ServerAdmin liam@liamwli.co.uk
        DocumentRoot "C:\xampp\xampp\blog"
        ServerName liamwli.co.uk
        ServerAlias www.liamwli.co.uk
        ErrorLog "logs/dummy-host.localhost-error.log"
        CustomLog "logs/dummy-host.localhost-access.log" combined
    </VirtualHost>

Does anyone know what the problem I am having is?

As I said, I am running Apache2 via XAMPP on a Windows Server 2003 VPS.

share|improve this question
    
From here, https://liamwli.co.uk works fine, but https://techmastersforum.co.uk returns net::ERR_SSL_PROTOCOL_ERROR –  Mathias R. Jessen Mar 10 '12 at 17:10
    
Hi all, I have now managed to fix this, but cannot post an answer for 8 hours. –  Liam W Mar 10 '12 at 17:18
add comment

closed as off-topic by Tom O'Connor Aug 14 '13 at 21:22

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions must be relevant to professional system administration. Server Fault is a site dedicated to professionals; novice questions are off-topic. Please see the Help Center for more information on topicality. The best advice we can give you is to hire a professional to help you out." – Tom O'Connor
If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers

As explained in this answer, you cannot use 2 different certificates for the same endpoint (ipaddress:port).

If you have 2 static IP addresses, assign a HTTPS vhost to each, like this:

<VirtualHost 1.1.1.1:443>
    ServerAdmin liam@liamwli.co.uk
    DocumentRoot "C:\xampp\xampp\blog"
    ServerName liamwli.co.uk
    ServerAlias www.liamwli.co.uk
    ErrorLog "logs/liamwlissl.log"
    CustomLog "logs/liamwlissl.log" combined
    SSLEngine On
    SSLCertificateFile "C:\xampp\xampp\certs\www_liamwli_co_uk.crt"
    SSLCertificateKeyFile "C:\xampp\xampp\certs\www_liamwli_co_uk.key"
    SSLCACertificateFile "C:\xampp\xampp\certs\GeoTrust_CA_Bundle.crt"
</VirtualHost>

<VirtualHost 2.2.2.2:443>
    ServerAdmin liam@liamwli.co.uk
    DocumentRoot "C:\xampp\xampp\htdocs"
    ServerName techmastersforum.co.uk
    ServerAlias www.techmastersforum.co.uk
    ErrorLog "logs/tmfssl.log"
    CustomLog "logs/tmfssl.log" combined
    SSLEngine On
    SSLCertificateFile "C:\xampp\xampp\certs\www_techmastersforum_co_uk.crt"
    SSLCertificateKeyFile "C:\xampp\xampp\certs\www_techmastersforum_co_uk.key"
    SSLCACertificateFile "C:\xampp\xampp\certs\GeoTrust_CA_Bundle.crt"
</VirtualHost>
share|improve this answer
add comment

I had this problem. I did manage to fix it though. I would recommend you use the httpd.exe -t option to check for syntax errors.

You should provide a NameVirtualHost *:443 directive above the ssl inserts. I have provided a fixed httpd-vhosts.conf file.

NameVirtualHost *:80
    <VirtualHost *:80>
        ServerAdmin liam@liamwli.co.uk
        DocumentRoot "C:/xampp/xampp/htdocs"
        ServerName techmastersforum.co.uk
        ServerAlias www.techmastersforum.co.uk
        ErrorLog "logs/dummy-host.localhost-error.log"
        CustomLog "logs/dummy-host.localhost-access.log" combined
    </VirtualHost>

    <VirtualHost *:80>
        ServerAdmin liam@liamwli.co.uk
        DocumentRoot "C:\xampp\xampp\blog"
        ServerName liamwli.co.uk
        ServerAlias www.liamwli.co.uk
        ErrorLog "logs/dummy-host.localhost-error.log"
        CustomLog "logs/dummy-host.localhost-access.log" combined
    </VirtualHost>

NameVirtualHost *:443

<VirtualHost *:443>
        ServerAdmin liam@liamwli.co.uk
        DocumentRoot "C:\xampp\xampp\blog"
        ServerName liamwli.co.uk
        ServerAlias www.liamwli.co.uk
        ErrorLog "logs/liamwlissl.log"
        CustomLog "logs/liamwlissl.log" combined
        SSLEngine On
        SSLCertificateFile "C:\xampp\xampp\certs\www_liamwli_co_uk.crt"
        SSLCertificateKeyFile "C:\xampp\xampp\certs\www_liamwli_co_uk.key"
        SSLCACertificateFile "C:\xampp\xampp\certs\GeoTrust_CA_Bundle.crt"
    </VirtualHost>

    <VirtualHost *:443>
        ServerAdmin liam@liamwli.co.uk
        DocumentRoot "C:\xampp\xampp\htdocs"
        ServerName techmastersforum.co.uk
        ServerAlias www.techmastersforum.co.uk
        ErrorLog "logs/tmfssl.log"
        CustomLog "logs/tmfssl.log" combined
        SSLEngine On
        SSLCertificateFile "C:\xampp\xampp\certs\www_techmastersforum_co_uk.crt"
        SSLCertificateKeyFile "C:\xampp\xampp\certs\www_techmastersforum_co_uk.key"
        SSLCACertificateFile "C:\xampp\xampp\certs\GeoTrust_CA_Bundle.crt"
    </VirtualHost>
share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.