1、安裝httpd軟件包:
Yum install httpd
2、啟動(dòng)apache服務(wù):
[root@redhat Desktop]# /etc/init.d/httpd start
Starting httpd: [ OK ]
3、安裝mod-ssl軟件包
[root@redhat Desktop]# yum install mod_ssl –y
4、創(chuàng)建一個(gè)/date/www/html的目錄、并且修改安全上下文:
Chcon –t httpd_sys_content_t /date/ -R(l臨時(shí)修改都行)
5、在/date/www/html下添加一個(gè)apache可執(zhí)行的文件:
6、在/var/www/html下添加一個(gè)可執(zhí)行的文件
7、配置Apache的配置文件:(注意打開80端口)

8、配置ssl的配置文件:(注意添加 加密那2行)

9、重啟apache服務(wù):
[root@redhat conf.d]# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@redhat conf.d]#
10、配置域名解析:/etc/hosts
apache.example.com 192.168.0.1
redhat.example.com 192.168.0.1
11測(cè)試是否成功:

