apache可以解析如html,php等网络语言
配置apahce
1.安装apache服务
yum install -y httpd
2.将httpd服务加入开机启动项
systemctl start httpd
systemctl enable httpd
3.防火墙
firewall-cmd --list-all 查看防火墙信息
firewall-cmd --permanent --add-service=http
在火墙中永久开启https服务
firewall -cmd --reload
在不改变当前火墙状态的情况下刷新防火墙
4.配置服务文件参数
主配置文件 / etc/httpd/conf/httpd.conf
参数说明
ServerRoot 服务目录
ServerAdmin 管理员邮箱
User 运行服务的用户
Group 运行服务的用户组
ServerName 网站服务器的域名
DocumentRoot 网站数据目录
Listen 监听的IP地址与端口号
DirectoryIndex 默认的索引页页面
ErrorLog 错误日志文件
CustomLog 访问日志文件
Timeout 网页超时时间,默认为300秒
默认发布目录 /var/www/html
在默认目录下新建 index.html