How to Install an SSL Certificate on XAMPP

How to Install an SSL Certificate on XAMPP

Share This Post!

In this tutorial, we’ll guide you through the process of installing an SSL certificate on XAMPP. You’ll also discover the best place to purchase affordable SSL certificates.

Generate a CSR Code for XAMPP

If you’ve already generated the CSR code and received the SSL certificate in a ZIP folder, jump straight to the installation steps.

The Certificate Signing Request (CSR) is an encoded text file containing information about your domain and company. All commercial Certificate Authorities (CAs) require SSL applicants to submit a CSR code as part of the validation process.

Since XAMPP runs locally, you have multiple options for generating a CSR code:

  • Use CSR Generator Tool
  • Creating a CSR via the OpenSSL utility for Apache

Once you generate the CSR code and private key files, proceed to the installation steps.

Install an SSL Certificate on XAMPP

After your SSL Certificate is validated and delivered to your inbox, download the ZIP folder and extract its contents on your device.

Required Files:

  • Your primary SSL Certificate file
  • The CA Bundle or SSL Chain file (root and intermediate certificates)
  • Your private key file (generated along with the CSR code)

If your bundle consists of multiple files, merge them into a single .crt file, adding intermediate certificates first, followed by the root certificate.

Step 1: Create a Folder on Your XAMPP Server

Create a dedicated folder to store your SSL files. For example, you can use:

C:/xampp/apache/ssl

Step 2: Locate the Configuration File for Your Website

Use one of the following methods:

1. In the XAMPP Control Panel, click Config and select Apache (httpd-ssl.conf)

    2. Locate the configuration file manually in your XAMPP installation folder:

    C:/xampp/apache/conf/extra/httpd-ssl.conf

    Step 3: Edit the Virtual Host for Port 443

    Open the configuration file in a text editor (e.g., Notepad) and modify the settings:

    DocumentRoot "/var/www"
    ServerName yourdomain.com
    ServerAlias www.yourdomain.com
    SSLEngine on
    SSLCertificateFile "C:/xampp/apache/ssl/yourdomain_com.crt"
    SSLCertificateKeyFile "C:/xampp/apache/ssl/yourdomain_com.key"
    SSLCACertificateFile "C:/xampp/apache/ssl/yourdomain_com.ca-bundle"

    Replace yourdomain.com and file paths with actual names and locations.

    Step 4: Restart the Server

    • In the XAMPP Control Panel, click Stop, then Start Apache.
    • Your SSL Certificate is now installed successfully!

    Test Your SSL Installation

    After installation, verify your SSL setup using online SSL testing tools. These tools provide instant scans and reports to detect any errors.

    Where to Buy the Best SSL Certificate for XAMPP?

    For affordable and reliable SSL certificates, check out Symple Logix. We offer a wide range of SSL products compatible with XAMPP, suitable for any project size and budget.

    Share This Post!