1、 把/dev/sr0挂载到一个临时目录/mnt上
#mount /dev/sr0 /mnt
2、 编写源
#vim /etc/yum.repos.d/base/repo
3、 安装httpd和mod_ssl
#yum install httpd -y
#yum install mod_ssl -y
4、 开启httpd进程
#systematl start httpd
5、 关闭防火墙和放宽selinux
#systematl stop firewalld
#setenforce 0
6、 编写配置文件
#vim /etc/httpd/conf.d/vhost.conf
7、 创建目录文件
#mkdir /openlab
#mkdir /openlab/{student,data,money}
#echo 学生信息 > /openlab/student/index.html
因为该目录就在主目录下所以不用写Alias,可以直接访问
#echo 教学资源> /openlab/data/index.html
#mkdir /www
#mkdir /www/money 要想加密必须创建在一个不同目录下,因为要设置加密访问。
#echo 缴费信息 > /www/money/index.html
8、 编辑域名与IP的对应文件 要想用浏览器测试,必须修改本机的host文件
#vim /etc/hosts
C:/Windows/System32/drivers/etc/hosts
9、 编辑指定人物的信息
#htpasswd -c /etc/httpd/userfile song
#htpasswd /etc/passwd/userfile tian
10、 创建证书
#cd /etc/pki/tls/certs
#make openlab.crt
#ll
10、重启
#systemctl restart httpd