Apache配置文件分析

1.安装和启动apache:

[root@gaosh-64 ~]# yum install httpd
[root@gaosh-64 ~]# systemctl restart httpd
[root@gaosh-64 ~]# systemctl enable httpd
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.

2.常见配置参数:

vim /etc/httpd/conf/httpd.conf

ServerRoot "/etc/httpd"            #用于指定Apache运行的根目录
Listen 80                        #监听80端口
MaxClients  256                    #指定同时能访问服务器的客户机数量为256
DocumentRoot "/var/www/html"    #网页文件存放的目录
DirectoryIndex index.html index.html.var    #默认网站主页
Include conf.d/*.conf            #读取/etc/httpd/conf/conf.d/目录中所有以.conf结尾的文件
ServerName www.wg.com            #域名
ServerAdmin                        #设置管理员的邮箱
Include conf.d/*.conf            #包含的子配置文件
User apache                        #用户是apache
Group apache  

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值