Configure ssl for Linux + Apache

Source: Internet
Author: User
Reposted from: Network Security blog original link: blog reposted from: Network Security Blog
Original: http://www.safe121.com/post-40.html

Enable ssl first:a2enmod ssl
Then create a certificate
Create a folder for storing certificates:mkdir /home/cert
Then drop the certificate to the created directory:
openssl req -x509 -newkey rsa:1024 -keyout /home/cert/x73.pem -out /home/cert/x73.pem -nodes -days 9999999999999
Then edit the default configuration file of apache:vim /etc/apache2/sites-available/default(I am used to using nano. vi is so powerful)
Open Nima's editor and write in the last line


ServerSignature On
SSLEngine On
SSLCertificateFile SSL path (/home/cert/x73.pem)
ServerAdmin x@x73.cc
DocumentRoot "/website Path"
Php_admin_value open_basedir "/website path:/tmp"
ServerName domain name
ServerAlias domain name
CustomLog/website path/log-ssl combined



Enter/etc/init. d/apache2 restart
Restart the apache service. Alternatively, you can: service apache2 restart.
You can use https to access

Related Article

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.