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

Critical Security Flaw Uncovered in ChatGPT Atlas Browser: What Users Need to Know

OpenAI's newly launched ChatGPT Atlas browser is facing intense scrutiny after cybersecurity researchers discovered alarming…

8 hours ago

Cut Cloud Costs by 40% Without Breaking Your Infrastructure: 2025 Guide

Your AWS bill just doubled again—and nobody can explain why. If you're an IT manager…

23 hours ago

OpenAI Just Declared War on Google Chrome: Why Atlas Could Change Everything

The internet's future was rewritten this week. OpenAI's new "Atlas" browser isn't just another Chrome…

23 hours ago

AI Agents vs. Cyber Threats: How Autonomous Security Is Winning the War

In 2025, cyberattacks are faster and more sophisticated than ever. But now, a new generation…

23 hours ago

Vulnerability Management in 2025: From Swamped to Secure

Cyber attackers don’t wait—neither can your team. Vulnerability management has entered a new era, where…

24 hours ago

Critical Ingress Nightmare: Unauthenticated Remote Code Execution Vulnerabilities in Kubernetes NGINX Controller Demand Immediate Action

Critical Security Flaws Uncovered in Ingress NGINX Controller: Act Now to Protect Your Kubernetes Clusters.…

7 months ago

This website uses cookies.