Skip to content

2010.07.29 07:57

mod_gzip, mod_deflate

조회 수 19117 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
웹서버의 스트리밍데이타를 압축해서 보내자는 말이 나왔다.

당연히 mod_gzip을 찾아보고 적용 시키는 중에 죽어도 컴파일이 안되는 것이 발생해서...

그럼 php에서 한다고 생각해서 php 모듈을 찾다가 보니 그다지 뾰족한 것이 없었다.

더욱 찬찬히 찾아보니...

웬걸

삽질이었다.

Apache2 이상에서는 mod_gzip 대신에 mod_deflate에서 압축을 담당하는 것이었다.

적용을 해보자

1) httpd.conf
LoadModule deflate_module modules/mod_deflate.so
LoadModule headers_module modules/mod_headers.so
가 있는지 확인하자.

2) 적용할 디렉토리를 찾는다.
vhost를 사용하지 않으면 httpd.conf에 있을 것이고
vhost 사용시에는 각 도메인의 디렉토리를 찾는다.

2-1) 모두 압축하고 하지 않을 필터를 설정
<Directory 경로~>
SetOutputFilter DEFLATE
BrowserMatch ^Mozilla/4 gzip-only-text/html
BrowserMatch ^Mozilla/4\.0[678] no-gzip
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary
Header append Vary User-Agent env=!dont-vary
</Directory>

2-2) 압축할 필터를 설정
<Directory 경로~>
AddOutputFilterByType DEFLATE text/html text/plain text/css text/javascript text/xml application/x-javascript
</Directory>

3) apachectl -k restart
적용 완료 -_-


확인은 httpwatch 같은 것으로 패킷캡쳐 해보면 안다.

참고 site

http://httpd.apache.org/docs-2.0/mod/mod_deflate.html

  1. 브라우저 접속 제한하기

    Date2009.09.30 ByADMINPLAY Views14691
    Read More
  2. SSL 인증서 발급 후 SSL mode 시작시 두 개의 패스워드 입...

    Date2009.10.15 ByADMINPLAY Views14176
    Read More
  3. apache log에 그림이미지 파일 로그 안남기기

    Date2009.11.26 ByADMINPLAY Views14666
    Read More
  4. rewrite 모듈을 이욜한 서브도메인으로 홈페이지 운영하기

    Date2009.11.26 ByADMINPLAY Views14217
    Read More
  5. apache2 worker 방식 client 수치 설정법

    Date2009.11.26 ByADMINPLAY Views16069
    Read More
  6. 아파치 데몬이 안 뜰경우

    Date2009.11.26 ByADMINPLAY Views14874
    Read More
  7. squid 로 웹서버 가속하기..---== 강추 ==---

    Date2009.11.26 ByADMINPLAY Views18254
    Read More
  8. 사용자 인증

    Date2009.11.26 ByADMINPLAY Views14017
    Read More
  9. apache server 2.2, Tomcat5.5 로드밸런싱 및 클러스터

    Date2009.12.10 ByADMINPLAY Views19119
    Read More
  10. 아파치 GeoIP를 이용한 국가별 제한

    Date2010.01.30 ByADMINPLAY Views18787
    Read More
  11. apache + oracle (오라클 DB 한글깨짐)

    Date2010.02.24 ByADMINPLAY Views19594
    Read More
  12. *** glibc detected *** double free or corruption (!pre...

    Date2010.05.03 ByADMINPLAY Views26743
    Read More
  13. 트래픽분석툴(mod_throttle) 설치 및 설정 - apache1.3.x ...

    Date2010.05.03 ByADMINPLAY Views20019
    Read More
  14. APM + Snort + ADODB + BASE + oinkmaster 설치

    Date2010.05.29 Byl2zeo Views20816
    Read More
  15. 웹방화벽 ModSecurity 룰적용 순서

    Date2010.05.29 Byl2zeo Views18916
    Read More
  16. mod_gzip, mod_deflate

    Date2010.07.29 ByADMINPLAY Views19117
    Read More
  17. Apache - 도메인 포워딩

    Date2010.08.26 ByADMINPLAY Views18807
    Read More
  18. apache 외부링크 차단

    Date2010.08.31 ByADMINPLAY Views21221
    Read More
  19. apache, tomcat 가상디렉토리 설정

    Date2010.09.17 ByADMINPLAY Views23003
    Read More
  20. 리눅스 개인계정 로딩시 틸드(~)기호없이 그냥 사용

    Date2010.09.22 ByADMINPLAY Views20684
    Read More
Board Pagination Prev 1 2 3 4 5 Next
/ 5

Copyright ADMINPLAY corp. All rights reserved.

abcXYZ, 세종대왕,1234

abcXYZ, 세종대왕,1234