The standard for encrypted TCP/IP network products in the industry is SSL. For Hypertext Transfer Protocol (HTTP) commonly used on the Internet, the encrypted protocol is called HTTPS, and port 443 is used by default.
HTTPS data is transmitted after encryption, so it can effectively protect personal privacy information transmitted over the network.
Step 1: download the required software and unlock it to 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. Therefore, download the corresponding mod_ssl version.
Step 2: 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 and compile it into the Apache source code 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
Compile Apache in DSO mode:
# Pwd
/Usr/local/src/apache_1.3.24
#./Configure -- prefix =/usr/local/apache -- enable-rule = SHARED_CORE
-- Enable-module = ssl -- enable-shared = ssl
# Make
Create an SSL Certificate
In a production environment, certificates must be obtained from commercial Certification Authorities or internal CAS.
Follow these steps to generate a false certificate:
# Pwd
/Usr/local/src/apache_1.3.24
# Make certificate TYPE = custom
When the certificate is generated, the following message is displayed: <> the sample data is displayed.
First time:
Country Name (2-letters)
State or Province Name
Locality Name
Organization Name
Organizational Unit Name
Common Name
Email Address
Certificate Validity <1, 365>
The first time, a false CA is generated for testing. "Common Name" can be any text.
Second time
Country Name (2-letters)
State or Province Name
Locality Name
Organization Name
Organizational Unit Name
Common Name
Email Address
Certificate Validity <1, 365>
The second generation is the actual available certificate, which can be authenticated by commercial organizations or internal cas. "Common Name" is the Web server host Name.
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
Checking http://yourdomain.com and https://yourdomain.com on a browser