Problem With Overriding Default XAMPP SSL Certificate

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Problem With Overriding Default XAMPP SSL Certificate

Postby Kunju » 12. November 2008 15:30

I have 2 problems I need assistance with though I have a feeling the two are related. To begin with, I created an SSL certificate with common name localhost for testing purposes but when I install it on mozilla, the certificate viewer reads it as "localhost #2." Secondly, I am unable to override the apache friends default SSL certificate and its this that I believe (though obviously I could be wrong) that is causing a self-issued certificate named localhost to be read as "localhost #2" and as such when I run https:// on my browser, it detects the apache friends certificate.

Alternatively, could someone tell me another route I could possibly take? Thanks.
Posts: 13
Joined: 10. November 2008 00:38

Postby Sharley » 12. November 2008 23:41

In .\xampp\apache\conf\ssl.crt\ you will find a server.crt file
and in some of the other folders in that tree you will find related files called server.*

You will have to rename those and replace with your own files you created as these are related to the default localhost server certificate files.

Open server.crt with your associated file reader and you will see that it is indeed the localhost SSL certificate and needs to be installed into the trusted store, if not already, as will your newly created certificate.

The related Apache SSL configuration file is located here:

If you want to leave the default files in place and simply to add your new certificate files then you would need to edit this conf file to reflect the changed names - save the file after editing and restart the server but make a back up of the original file first (best practice when editing *.ini and/or *.conf files in XAMPP).
User avatar
AF Moderator
Posts: 3316
Joined: 03. October 2008 05:10
Location: Yeppoon, Australia Time Zone: GMT/UTC+10
Operating System: Win 7 Pro 32bit/XP Pro SP3

Postby Kunju » 13. November 2008 02:12

Thanks alot for the info! I had already exported my certificate to another folder and named it 'localhost.crt' & so I chose not to alter the server.crt file, but rather place it alongside localhost.crt. In the .\xampp\apache\conf\extra\httpd-ssl file, all I had to do was to alter the line SSLCertificateFile conf/ssl.crt/server.crt => SSLCertificateFile conf/ssl.crt/localhost.crt & viola the certificate was detected in my browser once I restarted Apache :D
Posts: 13
Joined: 10. November 2008 00:38

Return to XAMPP for Windows

Who is online

Users browsing this forum: supportrealm and 51 guests