Categories: linux

Install self signed ssl cert. on centos (https)

How to enable SSL on your Centos webserver!

Follow the steps bellow to create a new secure certificate for your website and enable https:

Centos 6.5

    1. First step is to check which modules are being used by apache2
      apachectl -M | grep ssl
    2. If module: ssl_module (shared) is loaded then we skip to step 3. If it is not loaded then we need to install it:
      yum -y install mod_ssl
      and restart apache:
      service httpd restart
    3. Create the folder where we will create the certificate:
      mkdir /etc/httpd/ssl
      and generate the certificate:
      openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/httpd/ssl/apache.key -out /etc/httpd/ssl/apache.crt
      while the certificate is being created you will be asked for some information (Country Code, Organization name e.t.c.) just fill out any information you want.
    4. This step is done to add the certificate to apache, we need to edit:
      vim /etc/httpd/conf.d/ssl.conf
      find the section: VirtualHost _default_:443 and under it add:
      ServerName secure.panosnet.com:443
      where you can replace secure.panosnet.com with your own fully qualified domain name.
      Then find the following parameters and set exactly what you see bellow:
      SSLEngine on
      SSLCertificateFile /etc/httpd/ssl/apache.crt
      SSLCertificateKeyFile /etc/httpd/ssl/apache.key
  1. Final step restart apache:
    service httpd restart
    Visit your website with https!

Self signed certificate is not advised to be installed on public websites as it is not a trusted certificate. That means that it will more likely confuse your visitors than trust the website.
It is highly recommended for private usage as it will secure your connection the same way a trusted one will.

panosnet

Share
Published by
panosnet

Recent Posts

Cryptic Bitcoin Transaction Unfolds: Revisiting Satoshi Nakamoto’s Genesis Wallet in a $1.17 Million Transaction

Introduction: In the early hours of January 5, the cryptocurrency community was abuzz with speculation…

4 months ago

Emerging Threat: SMTP Smuggling Exploits Flaws in Major Email Servers – how to spoof like a pro!

Summary: A newly identified technique called SMTP smuggling poses a significant threat to email security…

4 months ago

Unraveling the Operation Triangulation Spyware: A Deep Dive into iPhone Exploits

Since 2019, the Operation Triangulation spyware has targeted iPhone devices, exploiting undocumented features within Apple…

4 months ago

curl – SOCKS5 heap buffer overflow – CVE-2023-38545

The Challenge: CVE-2023-38545 In the world of digital security, a formidable adversary has emerged -…

7 months ago

Safeguard Your Confluence for an Urgent Upgrade!

Alert: Safeguard Your Confluence for an Urgent Upgrade! Advisory Release Date: Wednesday, Oct 4th, 2023,…

7 months ago

Curl new vulnerabilities to be announced on October 11, 2023

Curl, which relies on libcurl, is a widely-used command-line tool for transferring data via URL…

7 months ago

This website uses cookies.