######Apache####
# yum install httpd -y 安装apache软件
systemctl start httpd
systemctl enable httpd 启动apache服务
查看监听端口:
# ss -antlp |grep httpd
LISTEN
0
128
:::80
:::*
users:((“httpd”,4347,4),(“httpd”,4346,4),(“httpd”,4345,4),(“httpd”,4344,4),(“httpd”
,4343,4),(“httpd”,4342,4))
www.westos.org
3Apache主配置文件: /etc/httpd/conf/httpd.conf
ServerRoot “/etc/httpd” 用于指定Apache的运行目录
Listen 80 监听端口
User apache 运行apache程序的用户和组
Group apache
ServerAdmin root@localhost 管理员邮箱
DocumentRoot “/var/www/html” 网页文件的存放目录