실종 된 게 분명해 보입니다. 여기는 다음과 같습니다 :HTML 페이지 크기를 8000 자로 제한하고있는 것은 무엇입니까?
웹 페이지의 대부분의 내용은 서버 측 포함 또는 게시 페이지로드 AJAX 호출에 의해 생성되므로 HTML 파일의 크기는 일반적으로 상당히 작습니다. 그러나 테스트 페이지를 만들 때 아무 것도 복잡하게하지 않고도 페이지 크기가 8000자를 넘으면 서버가 페이지를 전송하지 않는다는 것을 발견했습니다.
<!DOCTYPE html>
<html>
<head>
<title>Rubbish</title>
</head>
<body>
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.<br />
반복 마지막 줄에 16 시간 총 17 개 완전한 라인을 제공하기 :
이
는 예제 파일입니다. 그 다음 줄의이 부분을 추가 : 위의
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliq.<br />
</body>
</html>
를 파이어 폭스와 그에 및 변형 '서버 연결이 갑자기 종료하기 때문에 페이지를로드 할 수 없습니다 사파리'라는 메시지와 함께로드되지 않는 8001 개 문자의 총입니다 및 크롬. 마지막 전체 정지 또는 다른 문자를 제거하면 문자 수가 감소하므로 페이지가 예상대로로드됩니다.
누구나 내가 그처럼 간단한 파일을로드 할 수 없다는 것에 대한 실마리를 줄 수 있습니까?
답변 : (일종의) 답변 : mod_deflate로 인해 문제가 발생했기 때문에 인터넷 검색 후 최대 크기를 변경하는 방법을 알고 있다면 serverfault에서 물어 봤습니다. 응답이 없었기 때문에 쉘 파일을 만들고 원본 8000 문자 파일을 서버 측 포함 (SSI)으로 포함 시켰습니다. 이제 예상대로 작동합니다. 평범한 HTML에는 한계가 있지만 SSI에는 제한이없는 이유는 아직 모르겠지만 더 이상 걱정할 시간이 없습니다.
EDIT : 'SetOutputFilter DEFLATE'지시문을 제거하면 페이지가로드되어 문제를 일으키는 모듈을 실제로 압축하는 것으로 나타납니다. 'DeflateBufferSize 10000'(또는 실제로 'DeflateBufferSize 2048')을 추가해도 지원되는 크기에는 아무런 차이가 없으므로이 질문을 닫고 서버 오류에 대해 모듈 수축을 묻습니다.
편집 : 죄송합니다. Fedora 14에서 Apache 2.2.17을 사용하고 있다고 언급 했어야합니다. 이것은 외부 랩톱의 가상 컴퓨터에 있으므로 외부 요인은 포함되어 있지 않습니다.
EDIT : 내가 추가해야 할 또 다른 점은 디버깅하도록 설정된 loglevel과 함께 아파치 오류 로그에 아무것도 없다는 것입니다. 액세스 로그에는 '200'메시지가 있지만 전송 된 문자 수는 '-'로 설정됩니다.
편집 : 다음은 httpd.conf 파일을 편집 한 것입니다. 다른 설정 파일은 없습니다. 출력이 압축되어 클라이언트에서 압축을 풉니 다.
### Section 1: Global Environment
ServerTokens prod
CoreDumpDirectory /tmp
ServerRoot "/etc/httpd"
PidFile run/httpd.pid
Timeout 120
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
<IfModule prefork.c>
StartServers 20
MinSpareServers 5
MaxSpareServers 20
ServerLimit 256
MaxClients 256
MaxRequestsPerChild 4000
</IfModule>
<IfModule worker.c>
StartServers 2
MaxClients 150
MinSpareThreads 25
MaxSpareThreads 75
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
Listen 80
#SOME LOAD MODULE CONFIG LINES REMOVED
LoadModule include_module modules/mod_include.so
LoadModule env_module modules/mod_env.so
LoadModule ext_filter_module modules/mod_ext_filter.so
LoadModule expires_module modules/mod_expires.so
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
LoadModule dav_module modules/mod_dav.so
LoadModule status_module modules/mod_status.so
LoadModule info_module modules/mod_info.so
LoadModule dav_fs_module modules/mod_dav_fs.so
LoadModule actions_module modules/mod_actions.so
LoadModule cache_module modules/mod_cache.so
LoadModule cgi_module modules/mod_cgi.so
Include conf.d/*.conf
ExtendedStatus Off
User apache
Group apache
### Section 2: 'Main' server configuration
ServerAdmin [email protected]
ServerName www.example.com:80
UseCanonicalName Off
DocumentRoot "/var/www/html"
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory "/var/www/html">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule mod_userdir.c>
UserDir disabled
</IfModule>
DirectoryIndex index.html index.html.var
AccessFileName .htaccess
<Files ~ "^.ht">
Order allow,deny
Deny from all
</Files>
TypesConfig /etc/mime.types
DefaultType text/plain
<IfModule mod_mime_magic.c>
MIMEMagicFile conf/magic
</IfModule>
HostnameLookups Off
#LOG CONFIG LINES REMOVED
ServerSignature Off
Alias /icons/ "/var/www/icons/"
<Directory "/var/www/icons">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
</Directory>
<IfModule mod_dav_fs.c>
DAVLockDB /var/lib/dav/lockdb
</IfModule>
IndexOptions FancyIndexing VersionSort NameWidth=* HTMLTable Charset=UTF-8
#ICON CONFIG LINES REMOVED
ReadmeName README.html
HeaderName HEADER.html
IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t
#LANGUAGE CONFIG LINES REMOVED
AddDefaultCharset UTF-8
AddType application/x-compress .Z
AddType application/x-gzip .gz .tgz
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl .crl
AddHandler send-as-is asis
AddHandler type-map var
AddOutputFilter INCLUDES .html .xml
AddType application/x-httpd-php .php .html
Alias /error/ "/var/www/error/"
<IfModule mod_negotiation.c>
<IfModule mod_include.c>
<Directory "/var/www/error">
AllowOverride None
Options IncludesNoExec
AddOutputFilter Includes html
AddHandler type-map var
Order allow,deny
Allow from all
LanguagePriority en es de fr
ForceLanguagePriority Prefer Fallback
</Directory>
</IfModule>
</IfModule>
#BROWSER MATCH CONFIG LINES REMOVED
<Location /server-status>
SetHandler server-status
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
<Location /server-info>
SetHandler server-info
Order deny,allow
Deny from all
Allow from 127.0.0.1
</Location>
### Section 3: Virtual Hosts
NameVirtualHost *:80
FcgidMaxRequestLen 2000000
FcgidMinProcessesPerClass 5
FcgidIdleTimeout 18000
FcgidIOTimeout 60
TraceEnable Off
SetEnvIf User-Agent ".*MSIE.*" ISIE true
<VirtualHost *:80>
ServerName www.example.com
UseCanonicalName off
DocumentRoot /etc/httpd/www/examples/
DirectoryIndex index.html index.html.var
CheckSpelling on
CheckCaseOnly on
<Directory /etc/httpd/www/examples/>
Options Includes
AllowOverride None
Order Deny,Allow
Allow from all
Header Set Cache-Control "max-age=10"
ExpiresActive On
ExpiresByType text/html "access plus 10 seconds"
ExpiresByType image/gif A259200
ExpiresByType image/jpg A3600
ExpiresByType text/html A259200
ExpiresByType image/ico A259200
SetOutputFilter DEFLATE
</Directory>
<Directory />
Order Deny,Allow
Deny from All
</Directory>
#OTHER DIRECTORY CONFIG LINES REMOVED
</VirtualHost>
어떤 웹 서버를 사용하고 있습니까? 네트워크 구성이 무엇입니까? – Leopd
그건 서버 문제입니다.어떤 서버? 설정을 확인하십시오. – SLaks
@Leopd, 절대적으로 필요한 서버 버전을 추가했습니다 (Apache 2.2.17) – blankabout