Tools

Account Tools

Search Tools


Add Apache2 SSL certificate

Generate the private key and a certificate request

As root on the ESIA server, generate a key and certificate using the command

copy
 openssl req -new -newkey rsa:2048 -nodes -keyout ESIA.key -out ESIA.csr 

Answer the questions. For the password challenge ⇒ leave blank, ENTER.

The above command has generated two files:

  • ESIA.key ⇒ The private key
  • ESIA.csr ⇒ to be sent to the certification authority

CSR = Certificate Signing Request

Certify the CSR file

The ESIA.csr file must be certified by a certification authority in order to obtain a CRT file.

Place the private key and the crt

After signing your CSR file. Place your two files in the

copy
 /usr/local/esia/certs/ 

Then open and modify the

copy
 nano /etc/apache2/sites-enabled/esia-ssl.conf 

The file contains this :

...

 

        SSLEngine on

        SSLCertificateFile /usr/local/esia/certs/enterprise-esia.crt

        SSLCertificateKeyFile /usr/local/esia/certs/enterprise-esia.key

</VirtualHost>

Replace « enterprise-esia.crt » with « ESIA.crt » and « enterprise-esia.key » with « ESIA.key »

To finish, restart the apache2 service

copy
 systemctl restart apache2 
en/advanced/apache2_certificat.txt · Last modified: 2023/11/09 18:12 by q.george