Debian4.0apache2 install ssl and configure

Source: Internet
Author: User
Debian4.0apache2 installation of ssl and configuration-Linux Release Technology-Debian information, the following is a detailed description. Install required software packages:

Install apache easily. Enter apt-get install apache2.
Install ssl: apt-get install ssl-cert.

Produce SSL certificate:

Create an ssl Directory: mkdir/etc/apache2/ssl
Create a certificate: make-ssl-cert/usr/share/ssl-cert/ssleay. cnf/etc/apache2/ssl/apache. pem

Modify the configuration file:

Modify/etc/apache2/ports. conf and add "Listen 443". The default port used by https is 443, which must be enabled accordingly.

Modify/etc/apache2/sites-available/default.
NameVirtualHost *

NameVirtualHost *

Change

NameVirtualHost *: 80


NameVirtualHost *: 80

Add an ssl configuration file: cp/etc/apache2/sites-available/default/etc/apache2/sites-available/ssl

Modify the ssl Configuration File
NameVirtualHost *: 80

NameVirtualHost *: 80

Changed:

Namevirtualhost*: 443


SSLEngine on
SSLCertificateFile/etc/apache2/ssl/apache. pem
Namevirtualhost*: 443 SSLEngine on SSLCertificateFile/etc/apache2/ssl/apache. pem

Activate an ssl site:

A2ensite ssl

Activate some modules of apache:

A2enmod ssl
A2enmod rewrite (this is a common module, although not required by ssl
A2enmod include

Installation tips:

I feel that the configuration is much more convenient than the ubuntu server. Although it is not installed by default like Fedora, Debian is much better than Fedora. You can configure everything by yourself and install a lot of junk files.

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.