Using SSL Certificate in CentOS 6 Apache Environment

Using SSL Certificate in CentOS 6 Apache Environment

condition:
VPS or Dedicated Server
CentOS 6 or later, with Apache installed. Memory: 512MB minimum

Installation steps:
1. Install Mod SSL
yum install mod_ssl

2. Create a directory to store certificates
mkdir /etc/httpd/ssl

3. Create a self-signed certificate
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/httpd/ssl/apache.key -out /etc/httpd/ssl/apache.crt

4. Create an SSL certificate
nano /etc/httpd/conf.d/ssl.conf
Find and replace it with ServerName example.com:443. Note that example.com is the domain name you want to encrypt.
The next 3 lines should be in the following format:
SSLEngine on
SSLCertificateFile /etc/httpd/ssl/apache.crt
SSLCertificateKeyFile /etc/httpd/ssl/apache.key

5. Restart Apache service
/etc/init.d/httpd restart

Now, you can visit, for example, https://zhujiwiki.com/

via: firstchoicehosting.co.uk

<<:  AlphaRacks: $10/year/2 CPUs/256MB/25GB/500GB/1 IP/OpenVZ

>>:  VPSSIM: Nginx – PHP-FPM – MariaDB one-click installation package

Recommend

CrownCloud 2GB RAM German KVM VPS Review (The Strongest Chicken)

Details: CrownCloud: $30/year/2GB memory/20GB SSD...

[Black Friday] Servdiscount: 10% off on German dedicated servers

servdiscount is a long-established German hosting...

BandwagonHost 2GB RAM Los Angeles CN2 GIA KVM VPS Review

Details: BandwagonHost: $10/month/2GB RAM/40GB SS...

TransIP Stack 1T network disk application and usage tutorial

TransIP's Stack network disk is relatively st...

GDCCLOUD: $1.24/month/256MB RAM/5GB SSD space/unlimited traffic/KVM/Russia

GDCCLOUD, a Russian hosting provider, was establi...

adman: $34/year/2GB RAM/20GB SSD space/unlimited traffic/100Mbps/KVM/Novosibirsk

adman.ru, a long-established Russian hosting prov...

VPSnet: $2.1/month/1GB RAM/10GB SSD space/unlimited traffic/OpenVZ/Lithuania

VPSnet, a Lithuanian hosting provider, was establ...

oplink: $5/month/1GB RAM/40GB SSD/unlimited traffic/XEN/Houston

Oplink was first introduced in 2012. This time we...

QuickPacket: $35/month/24GB memory/1TB hard drive/20TB traffic/5IP/Los Angeles

QuickPacket is a long-established hosting provide...

VirtuaVPS: $4.9/month/1 core/1GB memory/60GB space/1TB traffic/1 IP/OpenVZ

VirtuaVPS is a US hosting company that appears to...