1、安装httpd软件包:
Yuminstallhttpd
2、启动apache服务:
[root@redhatDesktop]#/etc/init.d/httpdstart
Startinghttpd:[OK]
3、安装mod-ssl软件包
[root@redhatDesktop]#yuminstallmod_ssl–y
4、创建一个/date/www/html的目录、并且修改安全上下文:
Chcon–thttpd_sys_content_t/date/-R(l临时修改都行)
5、在/date/www/html下添加一个apache可执行的文件:
6、在/var/www/html下添加一个可执行的文件
7、配置Apache的配置文件:(注意打开80端口)

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

9、重启apache服务:
[root@redhatconf.d]#/etc/init.d/httpdrestart
Stoppinghttpd:[OK]
Startinghttpd:[OK]
[root@redhatconf.d]#
10、配置域名解析:/etc/hosts
apache.example.com192.168.0.1
redhat.example.com192.168.0.1
11测试是否成功:

