目录
1.基于域名 www.openlab.com 可以访问网站内容为 welcome to openlab!!!
2.给该公司创建三个子界面分别显示学生信息,教学资料和缴费网站,
1、基于 www.openlab.com/student 网站访问学生信息,
2、基于 www.openlab.com/data 网站访问教学资料
3、基于 www.openlab.com/money 网站访问缴费网站。
(1)学生信息网站只有 song 和 tian 两个用户可以访问,其他用户不能访问。
(2)访问缴费网站实现数据加密基于 https 访问。

[root@localhost ~]# vim /etc/hosts

- [root@localhost ~]# vim /etc/hosts
- [root@localhost ~]# mkdir -p /www/openlab
- [root@localhost ~]# echo 'welcome to openlab!!!' > /www/openlab/index.html
- [root@localhost ~]# mkdir /www/openlab/student
- [root@localhost ~]# echo 'student' > /www/openlab/student/index.html
- [root@localhost ~]# mkdir /www/openlab/data
- [root@localhost ~]# echo 'data' > /www/openlab/data/index.html
- [root@localhost ~]# mkdir /www/openlab/money
- [root@localhost ~]# echo 'money' > /www/openlab/money/index.html
[root@localhost ~]# vim /etc/httpd/conf/httpd.conf

- [root@localhost ~]# useradd song
- [root@localhost ~]# passwd song
- Changing password for user song.
- New password:
- BAD PASSWORD: The password is shorter than 8 characters
- Retype new password:
- passwd: all authentication tokens updated successfully.
- [root@localhost ~]# useradd tian
- [root@localhost ~]# passwd tian
- Changing password for user tian.
- New password:
- BAD PASSWORD: The password is shorter than 8 characters
- Retype new password:
- passwd: all authentication tokens updated successfully.
- [root@localhost ~]# htpasswd -c /etc/httpd/passwd song
- New password:
- Re-type new password:
- Adding password for user song
- [root@localhost ~]# htpasswd /etc/httpd/passwd tian
- New password:
- Re-type new password:
- Adding password for user tian
- [root@localhost ~]# cat /etc/httpd/passwd
- song:$apr1$1TwDSUPf$bmyHk1uFq8Pmyv9ptb9kg.
- tian:$apr1$YVLlLgnf$mXRVVcI/OovX7pfQU.PTG1

最后进行systemctl restart httpd重启

