1.基于域名访问网站
[root@server ~]# setenforce 0
[root@server ~]# systemctl stop firewalld
[root@server ~]# systemctl disable firewalld
[root@server ~]# yum install httpd -y
[root@server ~]# systemctl start httpd
[root@server ~]# systemctl enable httpd
[root@server ~]# mkdir -p /www/openlab
[root@server ~]# echo "welcome to openlab! ! ! !" > /www/openlab/index.html
[root@server ~]# vim /etc/hosts
[root@server ~]# vim /etc/httpd/conf/httpd.conf
[root@server ~]# systemctl restart httpd
测试
2.实现用户song和tian可以访问,其他用户不能访问
[root@server ~]# yum install httpd mod_ssl -y
[root@server ~]# vim /etc/httpd/conf/httpd.conf
[root@server ~]# systemctl restart httpd
测试
3.实现教学资料网站
[root@server ~]# echo "data" > /www/openlab/data/index.html
[root@server ~]# vim /etc/httpd/conf/httpd.conf
[root@server ~]# systemctl restart httpd
测试
4.实现缴费网站加密基于https访问
[root@server ~]# vim /etc/httpd/conf.d/ssl.conf
测试: