Learn to use MoD

Source: Internet
Author: User
Tags install openssl openssl version ssl certificate

The standard for industry-encrypted TCP/IP networking products is SSL, which is the encrypted protocol known as HTTPS for the ubiquitous Hypertext Transfer Protocol (HTTP) on the Internet, using port 443 by default.

HTTPS data is transmitted after encryption, thereby effectively protecting personal privacy information transmitted over the network.

First step: Download the required software and unlock the/USR/LOCAL/SRC directory

Apache 1.3.24
Mod_ssl 2.8.8-1.3.24
Openssl-0.9.6c

Each mod_ssl version is related to a specific Apache version, so download the corresponding Mod_ssl version.

Step two: Compile and install

Install OpenSSL to/usr/local/ssl: # pwd

/usr/local/src/openssl-0.9.6c
# ./config
# make
# make test
# make install

Install MOD_SSL, compile into Apache's source tree: # pwd

/usr/local/src/mod_ssl-2.8.8-1.3.24
# ./configure --with-apache=/usr/local/src/apache_1.3.24
--with-ssl=/usr/local/ssl

To the DSO way to compile Apache: # pwd

/usr/local/src/apache_1.3.24
# ./configure --prefix=/usr/local/apache --enable-rule=SHARED_CORE
--enable-module=ssl --enable-shared=ssl
# make

Creating an SSL Certificate

In a production environment, certificates need to be obtained from a commercial certification authority or from an internal CA.

Perform the following steps to generate a fake certificate: # pwd

/usr/local/src/apache_1.3.24
# make certificate TYPE=custom

When you generate a certificate, you are prompted two times the following information:<> for demonstration data.

First time: Country Name (2-letters)

State or Province Name
Locality Name
Organization Name
Organizational Unit Name
Common Name
Email Address
Certificate Validity <365>

The first time will produce a fake, for testing the CA. "Common Name" can be any text.

Second pass Country Name (2-letters)

State or Province Name
Locality Name
Organization Name
Organizational Unit Name
Common Name
Email Address
Certificate Validity <365>

The second generation is the actual available certificate, which can be certified by a commercial organization or an internal CA, and "Common name" is the hostname of the WEB server.

Install and run Apache # pwd

/usr/local/src/apache_1.3.24
# make install

Start Apache, and test # pwd

/usr/local/apache/bin
# ./apachectl stop
# ./apachectl startssl

Check the Http://yourd omain.com and Https://yourd omain.com on the browser



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.