RHCE之WEB服务器作业

目录

一、实验要求

1.1 网站需求:

1.2 要求:

二、实验步骤

2.1 下载mod_ssl模块,关闭firewall

2.2 链接本机IP与域名

2.3 创建网页目录

2.4 建立该网站

​编辑

2.5 创建两位学生信息

2.6 实施数据加密

三、实验结果


一、实验要求

1.1 网站需求:

1.基于域名 www.openlab.com 可以访问网站内容为 welcome to openlab!!!
2.给该公司创建三个子界面分别显示学生信息,教学资料和缴费网站,
1、基于 www.openlab.com/student 网站访问学生信息,
2、基于 www.openlab.com/data 网站访问教学资料
3、基于 www.openlab.com/money 网站访问缴费网站。

1.2 要求:

(1)学生信息网站只有 song 和 tian 两个用户可以访问,其他用户不能访问。
(2)访问缴费网站实现数据加密基于 https 访问。

二、实验步骤

2.1 下载mod_ssl模块,关闭firewall

2.2 链接本机IP与域名

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

2.3 创建网页目录

[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

2.4 建立该网站

[root@localhost ~]# vim /etc/httpd/conf/httpd.conf

2.5 创建两位学生信息

[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

2.6 实施数据加密

最后进行systemctl restart httpd重启

三、实验结果

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Smiling Mr. Rui

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值