an'z
[root@localhost ~]# yum install httpd -y
更改配置文件
[root@localhost /]# vim /etc/hosts

创建根目录
[root@localhost ~]# mkdir -p /www/openlab
编辑网页内容
[root@localhost ~]# echo 'welcome to openlab' > /www/openlab/index.html
重启服务
[root@localhost ~]# systemctl restart httpd
测试
[root@localhost ~]# curl www.openlab.com
welcome to openlab
更改配置文件
[root@localhost /]# vim /etc/httpd/conf.d/vshots.conf
重启服务
[root@localhost ~]# systemctl restart httpd
data网页
[root@localhost ~]# mkdir /www/openlab/data
[root@localhost ~]# echo 'this is openlab data' > /www/openlab/data/index.html

最低0.47元/天 解锁文章
517





