>> Edit article
이름
제목
패스워드
<STYLE TYPE=text/css>LI { MARGIN:0 0 0 5; BORDER:0 SOLID RED; } BODY { FONT-FAMILY:Tahoma; FONT-SIZE:9pt; } BLOCKQUOTE { MARGIN:0 10 0 10; } .s { FONT-FAMILY:Tahoma; FONT-SIZE:9pt; COLOR:Text;} .s0 { CLEAR:Both;FONT-WEIGHT:bold; FONT-SIZE:18pt; BORDER-STYLE: none Solid dashed Solid; BORDER-WIDTH:0 0 1 0; MARGIN:20 0 5 0;} .s1 { MARGIN:0 0 0 20;} .s2 { CLEAR:Both;FONT-WEIGHT:bold; FONT-SIZE:14pt; BORDER-STYLE: none Solid dashed Solid; BORDER-WIDTH:0 0 1 0; MARGIN:10 0 5 0;} .s3 { MARGIN:0 0 0 20;} .function { COLOR:Blue; FONT-WEIGHT:Bold; } .vol { COLOR:Red; } .blue { COLOR:BLUE; } .RED { COLOR:RED; } .cont { COLOR:#6699CC; } .command { COLOR:BLUE;FONT-WEIGHT:BOLD; MARGIN:0 0 0 20;} .white_box { COLOR:BLACK;BACKGROUND-COLOR:WHITE; BORDER-WIDTH:1 1 1 1;BORDER-STYLE:solid solid solid solid; BORDER-COLOR:black; PADDING:5;FONT-WEIGHT:normal; } .black_box { COLOR:WHITE;BACKGROUND-COLOR:BLACK; BORDER-WIDTH:1 1 1 1;BORDER-STYLE:solid solid solid solid; BORDER-COLOR:black; PADDING:5;FONT-WEIGHT:normal; LINE-HEIGHT:100%;} .normal { FONT-FAMILY:Tahoma; FONT-SIZE:9pt; COLOR:Black; FONT-WEIGHT:normal;} .COPYLEFT { FONT-FAMILY:Tahoma; FONT-SIZE:9pt; BACKGROUND-COLOR:ThreedFace;COLOR:Text; BORDER-WIDTH:1 1 1 1;BORDER-STYLE:solid solid solid solid; BORDER-COLOR:black; } PRE { MARGIN : 5; }</STYLE> <DIV ALIGN=CENTER CLASS=copyleft> <H1>Apache mod_gzip.c Module install</H1> </DIV> <DL CLASS=s> <DT CLASS=s0>1. Module 설치하기 <DD CLASS=s1> <DL> <DT CLASS=s2>1-1. File Download (mod_gzip.so) <DD CLASS=s3> <a href='http://www.remotecommunications.com/apache/mod_gzip/' target='_blank'>http://www.remotecommunications.com/apache/mod_gzip/</a> 여기에서 "<A HREF="http://www.remotecommunications.com/apache/mod_gzip/src/1.3.19.1a/mod_gzip.so">mod_gzip.so</A>" (85K) (Linux용)을 Download 한다. 이파일을 "/etc/httpd/modules" 또는 "/usr/local/apache/libexec"에 복사한다.<BR> <DT CLASS=s2>1-2. Apache "httpd.conf" Setting. <DD CLASS=s3> <PRE CLASS=black_box> LoadModule gzip_module modules/mod_gzip.so # 만약 : /etc/httpd/modules 이면 LoadModule gzip_module libexec/mod_gzip.so # 또는 : /usr/local/apache/libexec 이면 AddModule mod_gzip.c <IfModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_min_http 1001 # 1000 = HTTP/1.0, 1001 = HTTP/1.1 mod_gzip_minimum_file_size 300 # 압축할 최소 Size mod_gzip_maximum_file_size 0 mod_gzip_maximum_inmem_size 100000 mod_gzip_keep_workfiles No mod_gzip_item_include file .html$ # 압축할 파일들 설정 mod_gzip_item_include file .htm$ mod_gzip_item_include file .jsp$ mod_gzip_item_include file .php$ mod_gzip_item_include file .pl$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^text/.html mod_gzip_item_include mime ^text/html$ # HTML 형식 모두 압축 mod_gzip_item_include mime ^application/x-httpd-php # PHP 스크립트 압축 mod_gzip_item_include mime ^httpd/unix-directory$ mod_gzip_item_include handler ^perl-script$ mod_gzip_item_include handler ^server-status$ mod_gzip_item_include handler ^server-info$ mod_gzip_item_exclude file .css$ # 압축 제외 파일들. mod_gzip_item_exclude file .js$ mod_gzip_item_exclude mime ^image/.* mod_gzip_temp_dir /dev/shm # 이것 Linux용이고요 보통 '/tmp'하시면됩니다. # 최고의 속도를 낼려면 RamDisk 의 위치를 넣으세요. LogFormat "%h %l %u %t "%V %r" %>s %b mod_gzip: %{mod_gzip_result}n In:%{mod_gzip_input_size}n Out:%{mod_gzip_output_size}n:%{mod_gzip_compression_ratio}npct." common_with_mod_gzip_info2 CustomLog logs/mod_gzip common_with_mod_gzip_info2 # Log 가 필요하신분만 넣으세요. 한줄로 쓰세요 t.t </IfModule></PRE> <DT CLASS=s2>1-3. Apache Server Restart <DD CLASS=s3> <PRE CLASS=black_box><B CLASS=cont># service httpd restart</B></PRE> </DL> <DT CLASS=s0>2. Static Complie (설치) <DD CLASS=s1> <DL> <DT CLASS=s2>2-1. File Download <DD CLASS=s3> <a href='http://www.remotecommunications.com/apache/mod_gzip/' target='_blank'>http://www.remotecommunications.com/apache/mod_gzip/</a> 에서 "<A HREF="http://www.remotecommunications.com/apache/mod_gzip/src/1.3.19.1a/mod_gzip.c">mod_gzip.c</A>" (300K) 을 Download 한다. 파일을 Apache Source 폴더에 Copy 한다. ('apache/src/modules/extra/') <DT CLASS=s2>2-2. Source Modify <DD CLASS=s3> apache/src/Configuration... (3개의 파일에 다음내용을 추하간다 "AddModule modules/extra/mod_gzip.o") <PRE CLASS=black_box> # cd ..../apache/ # Apache 소스 있는곳 # echo "AddModule modules/extra/mod_gzip.o" >> src/Configuration # configure 생성 파일 (?!) # echo "AddModule modules/extra/mod_gzip.o" >> src/Configuration.tmpl # configure 생성하기 전에 원시 파일 # ./configure --prefix=...... # configure 실행 필요한 옵션 넣으세요. # make # 컴파일 # service httpd stop # Web Server Stop # make install # Apache Install # httpd -l # 컴파일 된 모듈 확인 Compiled-in modules: http_core.c mod_env.c mod_log_config.c mod_mime.c mod_negotiation.c mod_include.c mod_dir.c mod_cgi.c mod_asis.c mod_imap.c mod_actions.c mod_userdir.c mod_alias.c mod_access.c mod_auth.c mod_setenvif.c mod_redurl.c # 한글 파일 처리 모듈 <B>mod_gzip.c</B> # 이것 이 있으면 정상. mod_php4.c # service httpd restart # Web Server Start</PRE> <DT CLASS=s2>2-3. Apache "httpd.conf" Setting. <DD CLASS=s3> <PRE CLASS=black_box> <IfModule mod_gzip.c> mod_gzip_on Yes mod_gzip_dechunk Yes mod_gzip_min_http 1001 # 1000 = HTTP/1.0, 1001 = HTTP/1.1 mod_gzip_minimum_file_size 300 # 압축할 최소 Size mod_gzip_maximum_file_size 0 mod_gzip_maximum_inmem_size 100000 mod_gzip_keep_workfiles No mod_gzip_item_include file .html$ # 압축할 파일들 설정 mod_gzip_item_include file .htm$ mod_gzip_item_include file .jsp$ mod_gzip_item_include file .php$ mod_gzip_item_include file .pl$ mod_gzip_item_include mime ^text/.* mod_gzip_item_include mime ^text/.html mod_gzip_item_include mime ^text/html$ # HTML 형식 모두 압축 mod_gzip_item_include mime ^application/x-httpd-php # PHP 스크립트 압축 mod_gzip_item_include mime ^httpd/unix-directory$ mod_gzip_item_include handler ^perl-script$ mod_gzip_item_include handler ^server-status$ mod_gzip_item_include handler ^server-info$ mod_gzip_item_exclude file .css$ # 압축 제외 파일들. mod_gzip_item_exclude file .js$ mod_gzip_item_exclude mime ^image/.* mod_gzip_temp_dir /dev/shm # 이것 Linux용이고요 보통 '/tmp'하시면됩니다. # 최고의 속도를 낼려면 RamDisk 의 위치를 넣으세요. LogFormat "%h %l %u %t "%V %r" %>s %b mod_gzip: %{mod_gzip_result}n In:%{mod_gzip_input_size}n Out:%{mod_gzip_output_size}n:%{mod_gzip_compression_ratio}npct." common_with_mod_gzip_info2 CustomLog logs/mod_gzip common_with_mod_gzip_info2 # Log 가 필요하신분만 넣으세요. 한줄로 쓰세요 t.t </IfModule></PRE> <DT CLASS=s2>2-4. Start web server <DD CLASS=s3> <OL> <LI> <B CLASS=blue>httpd -t</B> <LI> <B CLASS=blue>service httpd restart</B> </OL> logs/mod_gzip Log 파일 참조하세요. </DL> </DL> <DIV ALIGN=CENTER CLASS=copyleft> Copyleft (L) <A HREF="mailto: 꺼벙이 <thinker0@i.am>">thinker0@i.am</A> </DIV> 링크 : http://thinker0.x-y.net/cgi-bin/ez/ezboard.cgi?db=note_apache&action=read&dbf=85&page=0&depth=1
Copyleft
1999-2026 by
JSBoard Open Project
Theme Designed by
IDOO
All right reserved