日期:2014-05-16  浏览次数:20841 次

Apache服务器配置与使用工作笔记
基本命令
httpd -e warn 临时修改日志级别
httpd -v 版本信息
httpd -l 列出模块
httpd -t 测试配置文件的语法

监控Apache
/server-status
/server-info

http.conf 
主服务部分
ServerName
ServerRoot
DocumentRoot
ServerAdmin
User
Group
Listen
LoadModule
ErrorDocument

容器部分
<IfModule>
<IfDefine>
<Directory> <DirectoryMatch>
<Files> <FilesMatch>
<Location>

访问tristan2目录的例子
Alias /tristan2/ "/opt/webhost/local/WHA-COMMON/apache/htdocs/tristan2/"

<Directory "/opt/webhost/local/WHA-COMMON/apache/htdocs/tristan2/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride None
    Order allow,deny
    Allow from all
</Directory>


扩展部分
Include xxxxx.conf

虚拟主机  没有用过
VirtualHost

日志分析软件
webalizer  awstats



第一阶段 一台服务器搞定  小小应用
第二阶段 数据库与web分开 缓存技术减少对DB的压力  squid静态页面缓存  小型网站
第三阶段 页面片段缓存 负载均衡 反向代理 增加服务器   HPSC 现阶段
第四阶段 对DB分库分表分布式缓存   大型网站
第五阶段 数据读写分家 分布式存储 提高内部通讯速度
第六阶段 拆分各种应用, 制定框架         taobao