Apache to turn on HTTPS

Source: Internet
Author: User

Apache must have mod_ssl software to support HTTPS

[email protected] www]# Yum install mod_ssl

[Email protected] ~]#/etc/init.d/httpd restart

Modify Firewall Add 443


Centos 6.x already provides the required private key and credential file for the default SSL mechanism

*/etc/httpd/conf.d/ssl.conf Mod_ssl provided by the Apache settings file;

*/etc/pki/tls/private/localhost.key System Private key file, you can use to make vouchers!

*/ETC/PKI/TLS/CERTS/LOCALHOST.CRT is an encrypted voucher file! (Signed certificate)


Added HTTPS the same page HTTP HTTPS is accessible it doesn't really make sense to split https and HTTP pages away


Can be decoupled using Apache's virtual machine mechanism


[Email protected] ~]# Mkdir/var/www/https

[[email protected] ~]# echo "This is HTTPS ' home" >/var/www/https/index.html


Modify the content of ssl.conf

[Email protected] ~]# vim/etc/httpd/conf.d/ssl.conf

Listen 443 <== preset listening port! No modification is recommended!

<virtualhost _default_:443> <== is the setting of the virtual host!

DocumentRoot "/var/www/https" <== about 84 lines, take out the note change the directory name

ServerName *:443 <== take off the comment and set the hostname to *

Sslengine on <== support SSL meaning!

Sslciphersuite all:! Adh:! export:! Sslv2:rc4+rsa:+high:+medium:+low

Sslcertificatefile/etc/pki/tls/certs/vbird.crt

Sslcertificatekeyfile/etc/pki/tls/certs/vbird.key

</VirtualHost>


[Email protected] ~]#/etc/init.d/httpd restart




Apache to turn on HTTPS

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.