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