# Installing on Apache

Installing SSL certificate on apache involves several steps. Here's a general guide to help you through the process. Please note that the exact steps may vary depending on your server configuration and the SSL certificate provider you use. In this guide, we will use Let's Encrypt as the certificate authority.

**Prerequisites**

* A running Apache web server.
* Shell access to your server.
* Administrative privileges.
* To convert your .cer into different file formats, Utilize our eMudhra utility tool to seamlessly transform your files into .cer, .pfx (.p12), .jks, or .pem formats, and conveniently import zip files using our CSR tool.

**1. Upload Certificate to Server**

First, copy your certificate files to the directory where you keep your certificate and key files. Typically, this directory is `/etc/ssl/` for your certificate.crt and ca\_bundle.crt files, and `/etc/ssl/private/` for your private.key file.

**2. Locate Configuration File**

Next, you will need to find the Apache configuration file on your server. Depending on the server and OS version you are running on, the configuration file is stored in different directories. Typically, you could search the directories `etc/httpd/, /etc/apache2/` or `/etc/httpd/conf.d/ssl.conf` for files named `httpd.conf`, `apache2.conf` or `ssl.conf.`

**3. Configure Virtual Host**

Once the Apache configuration file is located, you will need to configure the virtual host section of your website. Before you do so, please make sure to create a backup of your current `*.conf file`. This way, you will be able to undo any changes in case something goes wrong.

A typical Virtual Host file looks like the file below:

> ServerAdmin <admin@domain.com> DocumentRoot /var/www/ ServerName [www.domain.com](http://www.domain.com/) ErrorLog /www/home/logs/error\_log SSLEngine on SSLCertificateFile **/etc/ssl/certificate.crt** SSLCertificateKeyFile **/etc/ssl/private.key** SSLCertificateChainFile **/etc/ssl/ca\_bundle.crt**

The part above highlighted in bold is the one you will need to edit based on the file paths your certificate files are located in. Please make sure the attributes in bold don't have a "#" (comment) prepended; if they do, please remove that symbol to uncomment them.

As mentioned above, you will need to change the file names to match your certificate files and their location on the server:

* **SSLCertificateFile:** This is your primary SSL certificate file (certificate.crt)
* **SSLCertificateChainFile:** This is your intermediate CA-Bundle file (ca\_bundle.crt)
* **SSLEndEntity certificate File:** This is your end entity certificate.

**4. Save and restart the server**

Next, save your Apache configuration file and restart your server using one of the commands below:

* apachectl stop
* apachectl start
* apachectl restart

In case something goes wrong along the way, please rest assured that you will be able to revert your Apache configuration file using the backup you have created earlier in the process. This way, you will be able to start over again.

**5. Check Installation**

You have completed all the required steps to install your SSL certificate. Verify that the SSL certificate is correctly installed by accessing your website or service using HTTPS. After installing your certificate, it is a good practice to test your SSL setup using various online tools to ensure everything is working correctly.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.certinext.io/documentation/certificate-installation-guides/installing-on-apache.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
