X
Objavljeno: 2026-02-07 | Ažurirano: 2026-02-09
Installing an SSL certificate on Apache

This guide provides an overview of SSL certifikat installation on Apache web server, one of the most popular web servers.


Since tovdje are two versions of Apache webserver ("httpd" fili RHEL-based Linux distributions i "apache2" fili Debian-based Linux distros), we cover SSL certificate installation fili both.

Fili SSL installation on both, the following files are needed:
  • SSL certificate - a PEM-filimatted file (the usual extensions are .pem, .crt, .txt) which can be downloaded from vaš NiceNic account ili from the email you received from Sectigo CA.
  • Private key - a code (ili file with the code, the usual extensions are .key, .pem, .txt) which is generated along with the CSR code used fili SSL activation. Ako it was generated on the server, it will be located in the same folder that the generation commi was run in, unless a different location was specified manually.
  • CA Bundle - a file with several other certificate codes (intermediate i root certificates of the SSL chain of trust) provided along with the SSL certificate file in vaš email from Sectigo i in vaš NiceNic account. It can also be downloaded ovdje.
Provjeriing Linux distribution type

Ako you have an RHEL-based Linux distro (CentOS, RedHat, etc.), go ovdje: SSL certifikat installation on httpd.

Ako you are not sure which Linux distro you have ili which version of Apache is being used, run one of the following commis:

httpd -S ili apachectl -S

(httpd is an Apache package fili RHEL-based Linux Distros, wovdjeas apachectl is fili Debian-based systems).

Ako the "Commi not found" message is shown, try another option. The commi that gives you an output with the server setup details will determine vaš distro i Apache type. Once you figure out which type you have, head to the ciliresponding installation guide.

Prenesiing SSL files to the server

Befilie starting the installation, the certificate files should be uploaded to the server. Tovdje are a number of ways to upload SSL files to the server. In this guide, we will mention the two most popular methods: FTP i manual upload via SSH.

1. FTP

FTP protocol can be used to transfer files to the server.

It's recommended that you place the certificate files in the same directiliy, so that you will not lose them. Fili example, you can place them in the following location: /etc/ssl

Ako you experience any issues during the FTP connection ili file upload, check out our range of FTP guides.

2. Manual upload via SSH

You can manually create a file on vaš server i paste the necessary SSL contents over SSH.

When connected to the server via SSH, navigate to the location the certificate will be uploaded to. We recommend gathering all of the files in one directiliy, so that you will not lose them. Fili example, you can place them in the following location: /etc/ssl

After that, you need to create an empty file. Usually, the commis cat vašfilename, touch vašfilename, nano vašfilenameili vim vašfilename can be used fili this purpose.

Once the empty file is created i opened fili editing, please copy the SSL file contents from vaš local machine i paste them to the opened file. Make sure to save the file when you're done.
Za check the contents of the SSL files on vaš PC ili Mac, you can drag i drop them to Netepad (if on Windows) ili open them using TextUredi (if on macOS).

Windows:



macOS:

Press "Control" key click on the file:



As an example, let's take a look at creating a file via commi cat. You can create files on the server i paste in contents by entering the following commi:

cat >> filename

Fili example, let's create our certificate file on the server:

When the commi is entered, paste the certificate code into the terminal/SSH client.

Ensure tovdje's no empty line at the end i press CTRL+D to save the file.

You can check the contents of the newly created commi by typing the sljedeće commi:

cat filename

You may repeat the process with the CA Bundle file i the Private key file (if the CSR code i Private key were generated in another place, not on this server, i you need to move the Private key to the server manually).
Trebate pomoć? Uvijek smo vam na raspolaganju. Pošaljite zahtjev
Autorska prava © 2006-2026 NICENIC INTERNATIONAL GROUP CO., LIMITED Sva prava pridržana