#成功最有效的方法就是向有经验的人学习!
#现在的搜索引擎,想找到一点东西太难了
#整理出来,送给自己和需要的小伙伴

[root@oldboyedu-40 conf]# cat httpd.conf.orz 
#服务根目录::
ServerRoot "/application/appache2.2.34"
#服务在哪个端口监听,对外:
#默认本机所有地址
Listen 80
<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>

#默认用户
User daemon
Group daemon
</IfModule>
</IfModule>
#管理员邮箱
ServerAdmin you@example.com
#默认站点目录
DocumentRoot "/application/appache2.2.34/htdocs"

#权限控制,根目录
<Directory />
    #可带符号链接
    Options FollowSymLinks

    #禁止一些功能,比如重载
    AllowOverride None
    #不让任何人访问
    Order deny,allow
    Deny from all
</Directory>

#站点目录,新加目录时必需添加
<Directory "/application/appache2.2.34/htdocs">
    #Indexes :当没有首页时,对外展示目录结构,删掉或-Indexes  
    Options Indexes FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>


#指定访问的首页,如果有多个,用空格间隔
<IfModule dir_module>
    DirectoryIndex index.html
</IfModule>

#对以点开头的ht做什么样的处理,文件匹配
<FilesMatch "^\.ht">
    Order allow,deny
    Deny from all
    Satisfy All
</FilesMatch>
#错误日志存放位置
ErrorLog "logs/error_log"
#日志的级别
LogLevel warn
#日志的类型  common普通日志  combinedio 复合日志
<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>

#支持cgi的配置,基本已经淘汰,2001年前动态语言
#不知道的干掉
<IfModule alias_module>
    ScriptAlias /cgi-bin/ "/application/appache2.2.34/cgi-bin/"
</IfModule>
<IfModule cgid_module>
</IfModule>
<Directory "/application/appache2.2.34/cgi-bin">
    AllowOverride None
    Options None
    Order allow,deny
    Allow from all
</Directory>

#缺省的类型,普通的参数
DefaultType text/plain
#添加了什么类型,
<IfModule headers_module>
    RequestHeader unset Proxy early
</IfModule>
#对什么类型进行了什么控制
<IfModule mime_module>
    TypesConfig conf/mime.types
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz
</IfModule>

#ssl相关
<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
</IfModule>