作业11.6
网站需求:
1.基于域名www.openlab.com可以访问网站内容为 welcome to openlab!!!
# setenforce 0
# systemctl stop firewalld
# systemctl disable firewalld
# yum install nginx -y
第二步:新建index.html
[root@server ~]# mkdir -p /www/zy
echo welcome to openlab!!! > /www/zy/index.html
第三步:手动配置IP地址与域名的映射关系
[root@server ~]# vim /etc/hosts
# 添加如下内容:
192.168.108.135 www.openlab.com
[root@server ~]# vim /etc/nginx/nginx.conf


2.给该公司创建三个子界面分别显示学生信息,教学资料和缴费网站,
基于www.openlab.com/student 网站访问学生信息,
www.openlab.com/data网站访问教学资料
www.openlab.com/money网站访问缴费网站。
# 创建三个子目录(放在主网站目录 /www/zy 下,或独立目录均可)
mkdir -p /www/zy/student # 学生信息界面目录
mkdir -p /www/zy/data # 教学资料界面目录
mkdir -p /www/zy/money # 缴费网站界面目录# 为每个子界面创建首页文件(自定义内容,方便区分)
echo "This is Student Information Page - www.openlab.com/student" > /www/zy/student/index.html
echo "This is Teaching Materials Page - www.openlab.com/data" > /www/zy/data/index.html
echo "This is Payment Website - www.openlab.com/money" > /www/zy/money/index.htmlvim /etc/nginx/nginx.conf


3.要求 (1)访问该网站http请求都通过https响应。
(2)学生信息网站只有song和tian两人可以访问,其他用户不能访问。
