三、配置HTTPS
Https -- http + ssl(or tls)
服务器端进入/etc/pki/tls/certs目录,生成测试用的证书和私钥:
[root@linuxidc certs]# make test.crt
安装ssl模块:
yum install mod_ssl.x86_64 -y
编辑虚拟主机配置文件
43
44 #ServerAdmin webmaster@dummy-host.example.com
45 DocumentRoot /var/www/html/sg
46 ServerName www.sg.com
47 ServerAlias www1.sg.com
48 SSLEngine on
49 SSLCertificateFile /etc/httpd/conf/sg.crt
50 SSLCertificateKeyFile /etc/httpd/conf/sg.key
51 # ErrorLog "/var/log/httpd/dummy-host.example.com-error_log"
52 # CustomLog "/var/log/httpd/dummy-host.example.com-access_log" common
53
32
33 #ServerAdmin webmaster@dummy-host.example.com
34 DocumentRoot /var/www/html/sg
35 ServerName www.sg.com
36 ServerAlias www1.sg.com
37 RewriteEngine on
38 RewriteRule ^/(.*) https://www.sg.com/$1 [L,R]
39 # ErrorLog "/var/log/httpd/dummy-host.example.com-error_log"
40 # CustomLog "/var/log/httpd/dummy-host.example.com-access_log" common
41
2015职称计算机考试书PowerPoint2007中 .. 定价:¥45 优惠价:¥42 更多书籍 | |
2015年全国职称计算机考试教材(2007模 .. 定价:¥225 优惠价:¥213 更多书籍 |