1.基于域名www.openlab.com可以访问网站内容为 welcome to openlab!!!
2.给该公司创建三个子界面分别显示学生信息,教学资料和缴费网站,基于www.openlab.com/student 网站访问学生信息,www.openlab.com/data网站访问教学资料
www.openlab.com/money网站访问缴费网站。
3.要求:
(1)学生信息网站只有song和tian两人可以访问,其他用户不能访问。
(2)访问缴费网站实现数据加密基于https访问。
思路:
1.创建一个主目录,下面三个目录通过别名的方式来实现。
2.对于限制用户,只能song和tian登陆通过,通过AuthType等方式来限制。
3.对于缴费网站加密通过对整个网页实行https加密来实现。
实际操作:
a.挂载映像文件 mount /dev/sr0 /mn/
b.安装服务 yum install httpd -y
c.配置文件 vim /etc/httpd/conf.d/vhost.conf
d.创建资源文件 mkdir /www/openlab -p
cd /www/openlab/
vim index.html (写内容,然后保存)
mkdir money data student
vim money/index.html (写内容,然后保存)
vim data/index.html (写内容,然后保存)
vim student/index.html (写内容,然后保存)
e.切目录到密钥 cd /etc/pki/tls/certs/
f.创建证书 openssl req -newkey rsa:4096 -nodes -sha256 -keyout openlab.key -x509 -days 365 -out openlab.crt
g.添加用户 htpasswd -c /etc/httpd/users tian
htpasswd /etc/httpd/users song
g.关闭防火墙 systemctl stop firewalld
h.关闭内核 setenforce 0
j.重启httpd服务 systemctl restart httpd