全局参数设置
ServerRoot:服务器根目录 apache安装目录【我的为:/usr/local/apache/】
用于指定apache服务器的配置文件及日志文件存放的根目录。服务器的基础目录,apache所有内容都是相对于此目录(配置文件除外)
Listen:监听---格式Listen [ip]:portnumber [protocol]
Listen 80 监听端口
listen 192.168.128.128:80 监听从指定IP的端口
listen 192.168.128.128:80 http 监听指定IP、协议的端口
LoadModule:加载模块---格式LoadModule 模块名称 模块文件路径全名
如/usr/local/apache/modules/下有模块mod_deflate.so mod_expires.so mod_rewrite.so XX.so等
则加载方式为--LoadModule xx_module modules/xx.so
apache默认将已经编译的DSO(Dynamic Shared Object)模块存放于apache安装目录的modules中
User and Group:用户名与用户组
--格式 User 用户名 daemon
Group 用户组 daemon
(建议建立专用的apache服务用户名与用户组)
ServerAdmin:you@example.com 服务器管理员邮箱
ServerName www.example.com:80--服务器名
DocumentRoot:文档根目录[我的为:/usr/local/apache/htdocs/]
目录下有文件index.html,则可作访问http:192.168.128.128:80/index.html
===============默认配置模块:httpd-default.conf===================
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
=================多路处理模块:httpd-mpm.conf===================
<IfModule mpm-prefork_module>
StartServers 5
MinSpareServers 5
MaxSpareServers 10
MaxClient 150
MaxRequestsPerChild 0
</IfModule>
原文:http://www.cnblogs.com/cugb-2013/p/3634674.html