ServerRoot "/application/apache2.2.27" #服务根目录
Listen 80 #监听的端口,默认本机所有IP地址
<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>
User daemon #进程用户
Group daemon #进程用户组
</IfModule>
</IfModule>
ServerAdmin you@example.com #管理员邮箱,网站出问题,页面会显示此邮箱地址
DocumentRoot "/application/apache2.2.27/htdocs" #默认站点目录
<Directory /> #权限控制:根目录拒绝其他人访问
Options FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "/application/apache2.2.27/htdocs"> #站点目录htdocs,新增站点需要新增一个节点对应新增的站点目录
Options Indexes FollowSymLinks #Indexes参数:没有首页,会展示站点目录
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule dir_module>
DirectoryIndex index.html #指定默认首页,多个空格分隔,从前向后找
</IfModule>
<FilesMatch "^\.ht">
Order allow,deny
Deny from all
Satisfy All
</FilesMatch>
ErrorLog "logs/error_log" #错误日志
LogLevel warn #日志级别
<IfModule log_config_module> #日志类型
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
<IfModule logio_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
</IfModule>
CustomLog "logs/access_log" common
</IfModule>