Article Title: Use mod_ssl to make Apache more secure. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
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
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
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