Use OpenSSL to configure SSL for apache2 under Ubuntu

Source: Internet
Author: User
Tags openssl version

Installing Apache2

sudo Install apache2

Installing OpenSSL

General system comes with, can be viewed through OpenSSL version, if not,

sudo Install OpenSSL

Create a Directory

Create a directory that is named SSL

sudo mkdir /etc/apache2/ssl

Create a self-signed voucher

sudo 365 -newkey RSA:2048 -KEYOUT/ETC/APACHE2/SSL/APACHE.KEY-OUT/ETC/APACHE2/SSL/APACHE.CRT

Open Apache SSL Module

Run the following command to turn on the SSL module

A2enmod SSL

Modify the/etc/apache2/sites-available/default-ssl.conf file

Replace the certificate-related configuration with the

Sslcertificatefile/etc/apache2/ssl/apache

Generate a soft connection for the Default-ssl configuration file in the/etc/apache2/sites-enable/directory

sudo LN -s/etc/apache2/sites-available/default-ssl.conf/etc/apache2/sites-enable/001- Default-ssl.conf

Check that port 443 in the/etc/apache2/ports.conf file is already listening.

443

Restart Apache

sudo /etc/init.d/apache2 restart

Use OpenSSL to configure SSL for apache2 under Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.