Enable the SSL Service for APACHE

Source: Internet
Author: User


1. First, check that your Apache server has an encryption module installed, which can be OpenSSL or OpenSSL + ModSSL.
If your Apache web server is installed on Unix or linux, you can obtain OpenSSL through the following URL:
Http://www.openssl.org/source/
If your Apache web server runs on Windows, you can obtain OpenSSL + ModSSL through the following URL:
Http://www.modssl.org/contrib/

2. Use OpenSSL to generate a key pair (key pair) for the Apache server)
# Openssl req-new-nodes-keyout private. key-out public. csr
Here, you need to answer some questions based on the actual information of your Apache server, mainly including: Country Name, Province or intercontinental Name) locality Name, Organization Name, Organization Unit Name, Common Name, and email address) a challenge password and An opentional company name ).
It is worth noting that the country name must be abbreviated as the standard, CN for China, and FQDN for general names.

3. Two files are generated under your current directory: private. key and public. csr.
Private. key is your private key, and public. csr is the certificate request file.
4. Access ingress. Paste the public. csr file in the application page to complete the certificate application.

5. After applying for the certificate, copy the Certificate file to the directory where you saved the private key and request file.

6. Configure the http. conf file of your Apache server to open the https service.
Use the Editor (vi for unix or linux and notpad for windows. Please do not use word processing software such as word, because it will contain some invisible controllers)
Add the following content:
SSLCertificateFile/etc/ssl/crt/public. der
SSLCertificateKeyFile/etc/ssl/crt/private. key
Modify the preceding content based on the actual address of your certificate and private key.

7. Restart your Apache server. You can use the startup script.
# Apachectl stop
# Apachectl startssl
In this way, port 80 and port 443 of your Apache server provide services at the same time.

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.