搭建一个Web Server站点

题:搭建一个Web Server站点、安装web服务,并在本地创建index.html测试

1、安装http服务

yum -y install httpd

2、进入网站目录

cd /var/www/html/

3、创建索引文件

echo "test" > index.html

4、启动服务,设置开机自启动

systemctl start httpd.service
systemctl enable httpd.service

检查:

firefox http://127.0.0.1


更多详情:https://www.cnblogs.com/xiangsikai/p/8110067.html

原文地址:https://www.cnblogs.com/xiangsikai/p/10717474.html