apache不能正确地的处理一些php或其它类型文件.

由 xlreyur 在 06-11-2004 09:09 发表:

apache不能正确地的处理一些php或其它类型文件.

这个是帮朋友转的,他说是apache他没动过,睡了一觉就成这样了,有的php文件不能被正常访问,有的可以,apache以前是好好的,因此下面这些东西是没被修改过的,请大家帮帮忙,

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会关闭连接还是系统?.

但有些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

1<ifmodule mod_dir.c="">   
2  
3DirectoryIndex index.html index.php   
4  
5</ifmodule>

DocumentRoot "/www"

=================================================

Access control

=================================================

1<directory></directory>

Options None

AllowOverride None

Order deny,allow

Deny from all

1<directory "="" www"="">   
2  
3Order allow,deny   
4  
5Allow from all   
6  
7</directory>

=================================================

MIME encoding

=================================================

1<ifmodule mod_mime.c="">   
2  
3TypesConfig /usr/local/apache/conf/mime.types   
4  
5</ifmodule>

DefaultType text/plain

 1<ifmodule mod_mime.c="">   
 2  
 3AddEncoding x-compress Z   
 4  
 5AddEncoding x-gzip gz tgz   
 6  
 7AddType application/x-tar .tgz   
 8  
 9AddType application/x-httpd-php .php   
10  
11AddType application/x-httpd-php .inc   
12  
13AddType application/x-httpd-php .class   
14  
15</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

=================================================

N

Published At
Categories with 服务器类
Tagged with
comments powered by Disqus