|
apache不能正确地的处理一些php或其它类型文件.
以下是telnet的一结果
[root@localhost conf]# telnet 127.0.0.1 80
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
GET /indexphp.php HTTP/1.1
Host: lazy.9966.org
Accept: */*
User-Agent: Mozilla/4.0 (compatible; MSIE 5.00; Windows 9
Connection: Keep-Alive
Connection closed by foreign host.
不知道为什么apache会关闭连接还是系统关的?.
好像apache没处理请求就关闭连接了
而且在浏览器里是说 找不到服务器或发生 DNS 错误
在服务器删了indexphp.php又会发生404错误.
但有些php就可以
[root@localhost conf]# telnet 127.0.0.1 80
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
GET /db.php HTTP/1.1
Host: lazy.9966.org
Accept: */*
User-Agent: Mozilla/4.0 (compatible; MSIE 5.00; Windows 9
Connection: Keep-Alive
HTTP/1.1 200 OK
Date: Thu, 10 Jun 2004 22:51:23 GMT
Server: Apache
X-Powered-By: PHP/4.3.6
Keep-Alive: timeout=15, max=1024
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html
文件权限没有问题改到777也是这样,httpd.conf应该也是没有问题的.
httpd.conf如下:
# =================================================
# Basic settings
# =================================================
ServerType standalone
ServerRoot "/usr/local/apache"
PidFile /usr/local/apache/logs/httpd.pid
ScoreBoardFile /usr/local/apache/logs/httpd.scoreboard
ResourceConfig /dev/null
AccessConfig /dev/null
# =================================================
# Performance settings
# =================================================
Timeout 90
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 15
MinSpareServers 5
MaxSpareServers 10
StartServers 10
MaxClients 100
MaxRequestsPerChild 0
# =================================================
# Apache modules
# =================================================
ClearModuleList
AddModule mod_log_config.c
AddModule mod_mime.c
AddModule mod_dir.c
AddModule mod_access.c
AddModule mod_auth.c
AddModule mod_php4.c
AddModule mod_security.c
# =================================================
# General settings
# =================================================
Port 80
User nobody
Group nobody
ServerAdmin [email protected]
UseCanonicalName Off
ServerSignature Off
HostnameLookups Off
ServerTokens Prod
<IfModule mod_dir.c>
DirectoryIndex index.html index.php
</IfModule>
DocumentRoot "/www"
# =================================================
# Access control
# =================================================
<Directory />
Options None
AllowOverride None
Order deny,allow
Deny from all
</Directory>
<Directory "/www">
Order allow,deny
Allow from all
</Directory>
# =================================================
# MIME encoding
# =================================================
<IfModule mod_mime.c>
TypesConfig /usr/local/apache/conf/mime.types
</IfModule>
DefaultType text/plain
<IfModule mod_mime.c>
AddEncoding x-compress Z
AddEncoding x-gzip gz tgz
AddType application/x-tar .tgz
AddType application/x-httpd-php .php
AddType application/x-httpd-php .inc
AddType application/x-httpd-php .class
</IfModule>
# =================================================
# Logs
# =================================================
LogLevel warn
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %b" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
ErrorLog /usr/local/apache/logs/error_log
CustomLog /usr/local/apache/logs/access_log combined
ErrorDocument 404 /nofilefound.htm
ErrorDocument 500 /error.htm
# =================================================
# Virtual hosts
# =================================================
NameVirtualHost *
<VirtualHost *>
DocumentRoot "/www"
ServerName "lazy.9966.org"
ServerAlias "lazy.9966.org"
ErrorLog logs/lazy.9966.org/error_log
CustomLog logs/lazy.9966.org/access_log combined
</VirtualHost>
# ================================================
# Logging GET/POST requests, defending against
# Cross-Site-Scripting and SQL Injection attacks
# ================================================
<IfModule mod_security.c>
AddHandler application/x-httpd-php .php
SecAuditEngine On
SecAuditLog logs/audit_log
SecFilterScanPOST On
SecFilterEngine On
SecFilterDefaultAction "deny,log,status:500"
SecFilter "<(.|\n)+>"
SecFilter "'"
SecFilter "\""
</IfModule>
apache是在chroot下运行的.之前是可以的,是重启后过了一会发现有些php不行的(程序也是没有问题的).
apach1.3.31+php4.3.6
查看error log有exit signal File size limit exceeded
可在access log里查没有找到indexphp.php 的请求!
这到底是怎么回事呢?因为我对linux不熟希望高手们帮手解决.
小D在这谢谢了.
不想重编译安装apache跟php.去了安全模块也是这样,机子是RH linux9.0也没有用防火墙. |
|