Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2766538
  • 博文数量: 587
  • 博客积分: 6356
  • 博客等级: 准将
  • 技术积分: 6410
  • 用 户 组: 普通用户
  • 注册时间: 2008-10-23 10:54
个人简介

器量大者,福泽必厚

文章分类

全部博文(587)

文章存档

2019年(3)

2018年(1)

2017年(29)

2016年(39)

2015年(66)

2014年(117)

2013年(136)

2012年(58)

2011年(34)

2010年(50)

2009年(38)

2008年(16)

分类: LINUX

2011-06-02 21:44:56

1:机器要升级, 内存由4G---》8G  cpu由8-16 core!  apache编译的方式为
 
"--prefix=/usr/local/apache2" \
"--with-mpm=prefork" \
"--enable-so" \
"--enable-rewrite" \
"--with-apr=/usr/local/apache2/apr-httpd" \
"--with-apr-util=/usr/local/apache2/apr-util" \
"--enable-mods-shared=all" \
但我们原来的配置文件对应的不是dso的这种编译方式,
造成尽管配置文件中有
[root@node1 conf]# cat httpd.conf | grep php
LoadModule php5_module        modules/libphp5.so
 AddType application/x-httpd-php .php .php3 .php4
但php文件还是不能被解析!
安装好php后,用apache自带的配置文件可以运行php文件,但用原来机器的配置文件,却失败! php文件不能被解析(尽管配置文件中libphp5.so和php3的解析) , 原来是缺少LoadModule mime_module        modules/mod_mime.so
##This module provides for determining the types of files from the filename and for association of handlers with files.
将该模块加入到原来的配置文件中,并重启apache,问题即可解决
2:还是上面的场景(scenario),apache机器不能生成日志文件,就算
/usr/local/apache2/bin/apachectl  -f /usr/local/xncenter/confcenter/httpd.conf  -k
 graceful和killall httpd后,然后/usr/local/apache2/bin/apachectl  -f /usr/local/xncenter/confcenter/httpd.conf  都不能生产日志文件:
在配置文件中加入日志相关的模块,
LoadModule log_config_module modules/mod_log_config.so
LoadModule log_forensic_module modules/mod_log_forensic.so
LoadModule logio_module modules/mod_logio.so
下面是官方文档的介绍:
mod_logio.so:

This module provides the logging of input and output number of bytes received/sent per request. The numbers reflect the actual bytes as received on the network, which then takes into account the headers and bodies of requests and responses. The counting is done before SSL/TLS on input and after SSL/TLS on output, so the numbers will correctly reflect any changes made by encryption.

This module requires .

 

This module provides for flexible logging of client requests. Logs are written in a customizable format, and may be written directly to a file, or to an external program. Conditional logging is provided so that individual requests may be included or excluded from the logs based on characteristics of the request.

Three directives are provided by this module: to create a log file, to set a custom format, and CustomLog to define a log file and format in one step. The TransferLog and CustomLog directives can be used multiple times in each server to cause each request to be logged to multiple files.

mod_log_forensic:

This module provides for forensic logging of client requests. Logging is done before and after processing a request, so the forensic log contains two log lines for each request. The forensic logger is very strict, which means:

  • The format is fixed. You cannot modify the logging format at runtime.
  • If it cannot write its data, the child process exits immediately and may dump core (depending on your configuration).
 
重启httpd即可
3:apache启动时有如下错误:
Invalid command 'Order', perhaps misspelled or defined by a module not included
in the server configuration
解决方法:在配置文件中加载该模块即可!
LoadModule authz_host_module modules/mod_authz_host.so
阅读(1263) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~